Quiz Space

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

Question 8: Consider the following Python file “output.py” File: “out…

Question 8

+4.5 marksOne correct option

Consider the following Python file “output.py”

File: “output.py”

python
from jinja2 import Template
output = """<!DOCTYPE html>
<body>
<ul>
<!--Missing Jinja2 implementation-->
</ul>
</body>
</html>
"""
l = [5, 4, 3, 2, 1]
t = Template(output)
output = t.render(sl=l)
print(output)

Which of the following code snippet when placed at <!--Missing Jinja2 implementation–> will render the below unordered list as shown below?

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

Correct answer

  • C

Question 8 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 4.5 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. Q6Consider the following Flask code snippet: Assume the above code is running on server http://127.0.0.1:5000/ . What wil…
  7. Q7Consider the following code: What will be the color of the paragraph text when rendered in a browser?
  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: