Quiz Space

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

Question 5: Consider two Python files, main.py and utils.py with the …

Question 5

+3 marksOne correct option

Consider two Python files, main.py and utils.py with the following code snippets.

File1: main.py

python
import sys
import utils
print('Processing: ' + sys.argv[2])

File2: utils.py

python
import sys
print('Module: ' + sys.argv[0])

What is the output of the following command "python main.py data.txt output.txt" when run on terminal?

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

Correct answer

  • C

Question 5 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 3 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. Q2Consider the following code: app.py You are running a Flask web application locally using the command: python app.py. O…
  3. Q3Figure question
  4. Q4Figure question
  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.