Quiz Space

MAD 1 End Term: 11 December 2022, Set ETD1-2 (September 2022 term)

Question 1

+3 marksOne correct option

Consider the URL given below.
http://appdev1.com/sep-22?week=2\#MVC
Which of the following options correctly describes each component of the URL given above?

  1. A

    1-C, 2-A, 3-D, 4-B, 5-E

  2. B

    1-C, 2-A, 3-E, 4-B, 5-D

  3. C

    1-C, 2-A, 3-B, 4-D, 5-E

  4. D

    1-C, 2-A, 3-B, 4-E, 5-D

Question 2

+3 marksOne correct option

Consider the following flask python snippet with all preliminary conditions.

python
class User(UserMixin, db.Model):
id = db.Column(db.Integer, primary_key = True)
name = db.Column(db.String(30))
def __init__(self, id, name):
self.id = id
self.name = name
@login_manager.user_loader
def firstuser(id):
return User.query.get(int(id))
@app.route('/')
def index():
u1 = User.query.filter_by(id = 112).first()
login_user(u1)
return current_user.name + 'logged in'
@app.route('/logout')
@login_required
def logout():
logout_user()
return 'logged out'
@app.route('/home')
@login_required
def home():
return "current user is " + current_user.name
def init_db():
db.create_all()
new_user = User(112,'Rose')
new_user2 = User(113,'lily')
db.session.add(new_user)
db.session.add(new_user2)
db.session.commit()
if __name__ == '__main__':
init_db()
app.run(debug = True)

If the above program is running in the URL “http://127.0.0.1:8000” then what will be the output for the given URLs in sequence.

  1. A

    current user is lily
    logged out
    lily logged in

  2. B

    current user is Rose
    logged out
    Rose logged in

  3. C

    Rose logged in
    current user is Rose
    logged out

  4. D

    lily logged in
    current user is lily
    logged out

Question 3

+3 marksOne correct option

Which of the following statements is true about the way of adding style in HTML documents?

  1. A

    Order of precedence of external styles is greater than internal and inline style attributes

  2. B

    Order of precedence of internal styles is greater than inline and external style attributes

  3. C

    Order of precedence of Inline styles is greater than internal and external style attributes

  4. D

    None of these

29 more questions in this paper

Sign in with Google — it is free — to see every question with its answer and explanation, practise it in learning mode, or take it as a timed mock test.

More on the MAD 1 End Term 11 Dec 2022 Set ETD1-2 paper

The IIT Madras BS Modern Application Development I (MAD 1) End Term paper sat on 11 Dec 2022, in the September 2022 term, set ETD1-2: 32 questions for 100 marks in 180 minutes. The first 3 questions are below. Sign in with Google — it is free — to see the whole paper with its answers and explanations, in learning mode or as a timed mock test.

FeatureMAD 1 End Term 11 Dec 2022 Set ETD1-2 at a glance
TermSeptember 2022 term
SubjectModern Application Development I
Course codeBSCS2003
Questions32
Marks100
Duration180 min
MCQ23
MSQ8
Numerical1
Official paperIIT M DIPLOMA FN1 EXAM ETD1 11 Dec 2022
Negative markingNo negative marking.
Updated

Other sets that day

Same End Term, other subjects

More MAD 1