Quiz Space

May 2022 term · Programming in Python · BSCS1002

Programming in Python Quiz 1: 5 June 2022 (May 2022 term)

The IIT Madras BS Programming in Python (Python) Quiz 1 paper sat on 5 Jun 2022, in the May 2022 term: 13 questions for 50 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
13
Marks
50
Duration
120 min
MCQ
4
MSQ
5
Numerical
4

Updated

Official paper: IIT M FOUNDATION QUIZ1 EXAM QPB1 05 Jun 2022 · No negative marking.

Question 1

+3 marksOne correct option
  1. A
  2. B
  3. C
  4. D
Show answer

Correct answer

  • D

Question 2

+4 marksOne correct option
  1. A
  2. B
  3. C
  4. D
Show answer

Correct answer

  • C

Question 3

+4 marksOne correct option
  1. A

    Code-1 is correct and code-2 is incorrect

  2. B

    Code-1 is incorrect and code-2 is correct

  3. C

    Both codes are correct

  4. D

    Both are incorrect

Show answer

Correct answer

  • D

    Both are incorrect

Question 4

+4 marksOne correct option

What is the output of the following snippet of code?

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

Correct answer

  • A

Question 5

+4 marksOne or more correct options

Select all that apply.

  1. A

    If line-6 is executed, then line-8 will not be executed.

  2. B

    If line-11 is executed, then lines 14 to 17 will not be executed.

  3. C

    If line-8 is executed, the interpreter will directly jump to line-19 without even reading the remaining lines.

  4. D

    The interpreter evaluates at least three if conditions for any combinations of inputs.

Show answer

Correct answers

  • A

    If line-6 is executed, then line-8 will not be executed.

  • B

    If line-11 is executed, then lines 14 to 17 will not be executed.

  • D

    The interpreter evaluates at least three if conditions for any combinations of inputs.

Question 6

+4 marksOne or more correct options

Select all that apply.

  1. A

    agaiN

  2. B

    giVEN

  3. C

    goodSHOW

  4. D

    erasE

Show answer

Correct answers

  • A

    agaiN

  • D

    erasE

Question 7

+4 marksOne or more correct options

Select all that apply.

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

Correct answers

  • A
  • B

Question 8

+4 marksOne or more correct options

Select all that apply.

  1. A

    kind

  2. B

    kindkind

  3. C

    kindkindkind

  4. D

    kindkindkindkind

  5. E

    kindkindkindkindkind

  6. F

    kindkindkindkindkindkind

Show answer

Correct answers

  • A

    kind

  • B

    kindkind

  • C

    kindkindkind

  • F

    kindkindkindkindkindkind

Question 9

+4 marksOne or more correct options

Select all that apply.

  1. A
  2. B
  3. C
  4. D
  5. E
  6. F
Show answer

Correct answers

  • B
  • F

Question 10

+3 marksNumerical answer
Show answer

Correct answer: 55

Question 11

+4 marksNumerical answer
Show answer

Correct answer: 24

Question 12

+4 marksNumerical answer

The following code always accepts a positive even integer as input.

Show answer

Correct answer: 2

Question 13

+4 marksNumerical answer

What is the output of the following snippet of code?

Show answer

Correct answer: 56