Quiz Space

Modern Application Development I · Quiz 1 · 5 Jun 2022 · May 2022 term

Question 10: Consider the following code. What will be the output of …

Question 10

+3 marksOne correct option

Consider the following code.

python
from jinja2 import Template
template = """
{% for i in range(2) %}
{{user[i]}}'s marks are
{{mark[i]}}
{% endfor %}
"""
user = { 0: "Balu", 1: "Kala"}
mark = [[30,40,56,78],[25,67,80,90]]
x = Template(template)
print(x.render(user = user, mark = mark))

What will be the output of above program?

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

Correct answer

  • C

Question 10 of 16 in the IIT Madras BS Modern Application Development I (MAD 1) Quiz 1 paper sat on 5 Jun 2022, in the May 2022 term (IIT M DIPLOMA QUIZ1 EXAM QPE1 05 Jun 2022 IBA). It carries 3 marks.

More questions from this paper

  1. Q1Which of the following statement is true about MVC architecture?
  2. Q2The hexadecimal representation of the number 54578 is _ .
  3. Q3Consider a file consisting of 2000 alphanumeric characters including spaces. How much would be the total occupied space…
  4. Q4Choose the correct internal CSS that sets the body background color to green and the heading color of the text to red.
  5. Q5Consider the following HTML code below. How will the browser render the above given HTML file?
  6. Q6Consider the following Python code snippet. filename: code.py What will be the output on console if the command given i…
  7. Q7Consider the PyHTML program. What will be the output of the above program?
  8. Q8Figure question
  9. Q9Figure question
  10. Q11For a network bandwidth of 8 Gbps, what should be the size of each request if 5000 such requests are to be sent over th…
  11. Q12Which of the following statements is/are true about an HTML 5 document?
  12. Q13Consider the following HTML document with an embedded style sheet. Which of the following figures correctly represents …
  13. Q14Consider the following Python code snippet. How will the browser render the HTML file generated by the above Python cod…
  14. Q15Consider the DOM structure given below. If an HTML document is to be programmatically created using Pyhtml whose DOM st…
  15. Q16Consider a client which is located 6000 kilometers from the server makes a request through the cable. Suddenly after th…