Quiz Space

Programming in Python · Quiz 1 · 15 Mar 2026 · January 2026 term

Question 12: Consider the following Python code: Which of the followi…

Question 12

+4 marksOne or more correct options

Consider the following Python code:

Which of the following statements are true?

Consider the following Python code:

Select all that apply.

  1. A

    The output of the first statement is

  2. B

    The output of the second statement is

  3. C

    The default value of is used in the second function call

  4. D

    The function returns two values as a tuple

  5. E

    The output of the second statement is

Show answer

Correct answers

  • A

    The output of the first statement is

  • D

    The function returns two values as a tuple

  • E

    The output of the second statement is

Question 12 of 32 in the IIT Madras BS Programming in Python (Python) Quiz 1 paper sat on 15 Mar 2026, in the January 2026 term (Programming in Python 15 Mar 26). It carries 4 marks.

More questions from this paper

  1. Q1Consider the following code: What will be the output?
  2. Q2Consider the following code: What will be the output?
  3. Q3Consider the following code: What will be the output?
  4. Q4Consider the following code: What will be the output?
  5. Q5Consider the following Python code: What will be the output?
  6. Q6Consider the following Python code: What will be the output?
  7. Q7Consider the following code: What will be the output?
  8. Q8Consider the following code: What will be the output?
  9. Q9Consider the following Python code: Which of the following statements are true?
  10. Q10Consider the following Python code: Which of the following statements are true?
  11. Q11Consider the following Python code: Which of the following statements are true?
  12. Q13What is the output of the following snippet of code?
  13. Q14What is the output of the following snippet of code?
  14. Q15Consider the following snippet of code. What will the output be?
  15. Q16Consider the following snippet of code. What will the output be?
  16. Q17What is the output of the following snippet of code? Note: :checks whether an object belongs to a given type or any of …
  17. Q18What is the output of the following snippet of code? Note: :checks whether an object belongs to a given type or any of …
  18. Q19What is the output of the following snippet of code?
  19. Q20What is the output of the following snippet of code?
  20. Q21Consider the following snippet of code and answer the sub-questions: What is the value of after executing the given cod…
  21. Q22Consider the following snippet of code and answer the sub-questions: What is the value of after executing the given cod…
  22. Q23Consider the following snippet of code and answer the sub-questions: In the given code, if we change the condition to i…
  23. Q24Consider the following snippet of code and answer the sub-questions: In the given code, if we change the condition to i…
  24. Q25Consider the following snippet of code and answer the sub-questions: What are the values of and after executing the giv…
  25. Q26Consider the following snippet of code and answer the sub-questions: What are the values of and after executing the giv…
  26. Q27Consider the following snippet of code and answer the sub-questions: Which of the following statements are true?
  27. Q28Consider the following snippet of code and answer the sub-questions: Which of the following statements are true?
  28. Q29Consider the following snippet of code and answer the sub-questions:
  29. Q30Consider the following snippet of code and answer the sub-questions:
  30. Q31Consider the following snippet of code and answer the sub-questions:
  31. Q32Consider the following snippet of code and answer the sub-questions: