uiz Space

May 2026 term · Programming in Python · BSCS1002

Programming in Python Quiz 1: 19 July 2026 (May 2026 term)

The IIT Madras BS Programming in Python (Python) Quiz 1 paper sat on 19 Jul 2026, in the May 2026 term: 17 questions for 53 marks in 120 minutes. Every question is below with its answer. Take it as a timed mock test to be marked, or read it through first.

Questions
17
Marks
53
Duration
120 min
MCQ
7
MSQ
3
Written
7

Updated

Official paper: Programming in Python 16 Jul 26 · No negative marking.

Question 1

+1 markOne correct option

NAT → integer For all NAT questions in this exam, the answer will always be an integer and not a float value.

  1. A

    Instructions has been mentioned above.

  2. B

    This Instructions is just for a reference & not for an evaluation.

Show answer

Correct answer

  • A

    Instructions has been mentioned above.

Question 2

+3 marksOne correct option

What is the output of the following code?

What is the output of the following code?
  1. A

    —

  2. B

    —

  3. C

    —

  4. D

    —

Show answer

Correct answer

  • A

    —

Question 3

+3 marksOne correct option

What is the output of the following code?

What is the output of the following code?
  1. A

    —

  2. B

    —

  3. C

    —

  4. D

    —

Show answer

Correct answer

  • A

    —

Question 4

+3 marksOne correct option

Which of the following statements is TRUE regarding the code below?

Which of the following statements is TRUE regarding the code below?
  1. A

    and both become

  2. B

    changes the original list

  3. C

    becomes while becomes

  4. D

    returns a new sorted list

Show answer

Correct answer

  • C

    becomes while becomes

Question 5

+4 marksOne correct option

Consider the following code.

What will be printed?

Consider the following code.
  1. A

    —

  2. B

    —

  3. C

    —

  4. D

    —

Show answer

Correct answer

  • A

    —

Question 6

+4 marksOne or more correct options

Consider the following code. Select all expressions that evaluate to .

Select all that apply.

  1. A

    —

  2. B

    —

  3. C

    —

  4. D

    —

Show answer

Correct answers

  • A

    —

  • B

    —

Question 7

+4 marksOne or more correct options

Consider the following Python code.

Which of the following statements will run without giving an error?

Consider the following Python code.

Select all that apply.

  1. A

    —

  2. B

    —

  3. C

    —

  4. D

    —

Show answer

Correct answers

  • A

    —

  • B

    —

  • D

    —

Question 8

+4 marksWritten answer

What is the output of the following code?

What is the output of the following code?
Show answer

A written answer, not marked automatically.

Question 9

+4 marksWritten answer

What is the output of the following code?

What is the output of the following code?
Show answer

A written answer, not marked automatically.

Question 10

+4 marksWritten answer

What is the output of the following code?

What is the output of the following code?
Show answer

A written answer, not marked automatically.

Question 11

+3 marksWritten answer

What is the output of the following code?

What is the output of the following code?
Show answer

A written answer, not marked automatically.

Question 12

+4 marksOne correct option

Note: isinstance(val, datatype) returns True if val is of object of type 'datatype' and False, otherwise. Based on the above data, answer the given subquestions.

Note: isinstance(val, datatype) returns True if val is of object of type 'datatype' and False, otherwise.  Based on the

What is the value of ?

  1. A

    —

  2. B

    —

  3. C

    —

  4. D

    —

Show answer

Correct answer

  • A

    —

Question 13

+3 marksOne or more correct options

Note: isinstance(val, datatype) returns True if val is of object of type 'datatype' and False, otherwise. Based on the above data, answer the given subquestions.

Note: isinstance(val, datatype) returns True if val is of object of type 'datatype' and False, otherwise.  Based on the

Suppose the following condition inside the transform() function: is replaced with For the given input which of the following statements will become TRUE?

Select all that apply.

  1. A

    The final output becomes:

  2. B

    becomes

  3. C

    integer becomes

  4. D

    integer becomes

Show answer

Correct answers

  • A

    The final output becomes:

  • C

    integer becomes

Question 14

+4 marksOne correct option

Based on the above data, answer the given subquestions.

Based on the above data, answer the given subquestions.

What is the value of ?

  1. A

    —

  2. B

    —

  3. C

    —

  4. D

    —

Show answer

Correct answer

  • D

    —

Question 15

+3 marksWritten answer

Based on the above data, answer the given subquestions.

Based on the above data, answer the given subquestions.

How many times is the condition evaluated?

Show answer

A written answer, not marked automatically.

Question 16

+1 markWritten answer

Note: isinstance(val, datatype) returns True if val is of object of type 'datatype' and False, otherwise. Based on the above data, answer the given subquestions.

Note: isinstance(val, datatype) returns True if val is of object of type 'datatype' and False, otherwise.  Based on the
Show answer

A written answer, not marked automatically.

Question 17

+1 markWritten answer

Based on the above data, answer the given subquestions.

Based on the above data, answer the given subquestions.
Show answer

A written answer, not marked automatically.