Quiz Space

Modern Application Development I · End Term · 31 Aug 2025 · May 2025 term · Set QDD1

Question 27: Prashant and Nikita are creating a quiz question paper c…

Question 27

+3 marksOne correct option

Prashant and Nikita are creating a quiz question paper collaboratively. They are each working on different sections — and complete their tasks in parallel. Meanwhile, Mayur is enjoying a single-player game that finishes when the game loop ends.

To compare productivity:

  • If Prashant and Nikita (together) finish faster than Mayur, the winner is "Team".
  • If Mayur finishes faster, he wins.
  • If both take the same time, Mayur wins by default.

Prashant and Nikita send their task completion times to a Flask backend via query parameters.The server must simulate parallel execution of their tasks (i.e., max(prashant_time, nikita_time)) and compare it against Mayur's game time. The route returns who finishes faster.

python
from flask import Flask, jsonify, request
app = Flask(__name__)
@app.route('/task')
def task():
prashant_time = int(request.args.get("prashant"))
nikita_time = int(request.args.get("nikita", 3))
mayur_time = int(request.args.get("mayur", 6))
team_time = max(prashant_time, nikita_time) # parallel processing
winner = "Team" if team_time < mayur_time else "Mayur"
return jsonify({
"winner": winner,
"team_time": team_time,
"mayur_time": mayur_time
})

Based on the above data, answer the given subquestions.

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

Correct answer

  • D

Question 27 of 32 in the IIT Madras BS Modern Application Development I (MAD 1) End Term paper sat on 31 Aug 2025, in the May 2025 term (IIT M DIPLOMA FN EXAM QDD1 31 Aug 2025). It carries 3 marks.

More questions from this paper

  1. Q1You're designing an API to update a user's profile picture but your database has 4 records in a row, profile picture is…
  2. Q2What is the correct sequence of operations when receiving a form in Flask?
  3. Q3Consider the following statements and choose the correct option\ Statement 1: It is mandatory to implement server-side …
  4. Q4What will be the output when accessing http://localhost:5000/user/42 in the following Flask app?
  5. Q5Consider the following HTML form: What URL will be generated when the user enters "flask" in the input box and clicks o…
  6. Q6You're creating a registration form. The form is written as: And in Flask: When the user submits the form, they see a 4…
  7. Q7You created the following templates: base.html home.html But when rendered, "Welcome!" doesn't appear. Why?
  8. Q8A user downloads a 10 MB file from a server with 5 Mbps speed. How long does it approximately take?
  9. Q9Suppose you have these models in your Flask-SQLAlchemy app: If you delete an Author instance from the database, what ha…
  10. Q10Consider the following HTML code snippet (without any CSS styling). Which of the following statements correctly describ…
  11. Q11Consider the following HTML document with internal CSS and inline styles. What will be the final color and font-size fo…
  12. Q12Figure question
  13. Q13Consider the following Python code. File name: main.py What will be the output, when running the above code using the c…
  14. Q14Consider the HTML code below, what will be the text color of the paragraph?
  15. Q15Figure question
  16. Q16You are working on a team project hosted on GitHub. After making changes to your local files, you run the following com…
  17. Q17Consider the following Python script that processes command line arguments and uses Jinja2 templates. python: app.py If…
  18. Q18Consider the following Flask application structure and code. app.py: Which of the following statements about the templa…
  19. Q19Examine the following Python code snippet. File: logger_test.py What will be the output when running the command: pytho…
  20. Q20Which statements about REST API design are correct?
  21. Q21Figure question
  22. Q22Consider the following Python code. Which of the following statement(s) prints the output without any KeyError exceptio…
  23. Q23Consider the following Flask app code. Assume the above flask app runs on “http://127.0.0.1:5000/” and is accessed thro…
  24. Q24Examine the following Python test file: Filename: math_tests.py Consider the following pytest command output: Which of …
  25. Q25Figure question
  26. Q26Prashant and Nikita are creating a quiz question paper collaboratively. They are each working on different sections — a…
  27. Q28Consider the following Flask-SQLAlchemy models for a library management system: File: models.py File: app.py Based on t…
  28. Q29Consider the following Flask-SQLAlchemy models for a library management system: File: models.py File: app.py Based on t…
  29. Q30Consider the following flask code and answer the given subquestions.
  30. Q31Consider the following flask code and answer the given subquestions.
  31. Q32Consider the following flask code and answer the given subquestions.