Quiz Space

Modern Application Development I · Quiz 1 · 26 Oct 2025 · September 2025 term

Question 2: Consider the following code: app.py You are running a Fla…

Question 2

+2 marksOne correct option

Consider the following code:

app.py

python
from flask import Flask
app = Flask(__name__)
@app.route("/")
def port():
return "This is the port question."
if __name__ == "__main__":
app.run(port=5008)

You are running a Flask web application locally using the command: python app.py. On which URL will the application be accessible on the browser?

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

Correct answer

  • D

Question 2 of 16 in the IIT Madras BS Modern Application Development I (MAD 1) Quiz 1 paper sat on 26 Oct 2025, in the September 2025 term (IIT M DIPLOMA AN EXAM QDD2 26 Oct 2025). It carries 2 marks.

More questions from this paper

  1. Q1Which of the following is the correct syntax to display the total number of courses in a Jinja2 template?
  2. Q3Figure question
  3. Q4Figure question
  4. Q5Consider two Python files, main.py and utils.py with the following code snippets. File1: main.py File2: utils.py What i…
  5. Q6Figure question
  6. Q7Consider the following Python code snippet. If the above Python code runs on the terminal, which of the following state…
  7. Q8Figure question
  8. Q9Consider the following HTML and CSS code: What is the total width (approximately ) of the div with class="container" an…
  9. Q10Consider the following code: You are building a Flask web application that takes user input from an HTML form and displ…
  10. Q11Figure question
  11. Q12Figure question
  12. Q13Consider the following Python code snippet. Filename: server.py Based on the above data, answer the given subquestions.
  13. Q14Consider the following Python code snippet. Filename: server.py Based on the above data, answer the given subquestions.
  14. Q15Consider the following Flask code: login.html Based on the above data, answer the given subquestions. From the given op…
  15. Q16Consider the following Flask code: login.html Based on the above data, answer the given subquestions.