Quiz Space

Modern Application Development I · Quiz 1 · 13 Jul 2025 · May 2025 term

Question 6: Consider the following Flask code snippet: Assume the abo…

Question 6

+3 marksOne correct option

Consider the following Flask code snippet:

python
from flask import Flask, url_for, request, redirect
app = Flask(__name__)
@app.route("/signin/user")
def login():
return url_for("login")
@app.route("/")
def home():
return redirect(url_for("login"))
app.run(debug=True)

Assume the above code is running on server http://127.0.0.1:5000/ . What will be the output on a web browser for the URL: http://127.0.0.1:5000/ ?

  1. A
  2. B
  3. C
  4. D
Show answer

Correct answer

  • B

Question 6 of 16 in the IIT Madras BS Modern Application Development I (MAD 1) Quiz 1 paper sat on 13 Jul 2025, in the May 2025 term (IIT M DIPLOMA AN EXAM QDD2 13 July 2025). It carries 3 marks.

More questions from this paper

  1. Q1What will be the output of the following HTML code?
  2. Q2Figure question
  3. Q3Consider the following HTML code snippet. filename: index.html Which elements from the above document will have a red b…
  4. Q4Consider the following Python code snippet. Filename: code.py Which of the following statements will throw a key error?
  5. Q5What will be the output of the following Jinja2 template when rendered in Flask?
  6. Q7Consider the following code: What will be the color of the paragraph text when rendered in a browser?
  7. Q8Consider the following Python file “output.py” File: “output.py” Which of the following code snippet when placed at \<!…
  8. Q9Consider the following Python code snippet: main.py We are executing above main.py in command line with command python …
  9. Q10We want to use an online grammar checking tool, which takes each word from the client and sends it to the web server. T…
  10. Q11Consider a client which is located 3000 km from the server makes a request through the cable. Suddenly after the reques…
  11. Q12Consider the following Python code snippet and answer the given subquestions Filename: webapp.py
  12. Q13Consider the following Python code snippet and answer the given subquestions Filename: webapp.py
  13. Q14Consider the following Python code snippet and answer the given subquestions Filename: webapp.py
  14. Q15Given the following code, answer the given subquestions:
  15. Q16Given the following code, answer the given subquestions: