Quiz Space

September 2023 term · Programming in Python · BSCS1002

Python End Term: 24 December 2023, Set ADD3 (September 2023 term)

The IIT Madras BS Programming in Python (Python) End Term paper sat on 24 Dec 2023, in the September 2023 term, set ADD3: 19 questions for 50 marks in 180 minutes. Every question is below with its answer. Take it as a timed mock test to be marked, or read it through first.

Questions
19
Marks
50
Duration
180 min
MCQ
8
MSQ
4
Numerical
7

Updated

Official paper: IIT M DIPLOMA FN EXAM FDD1 24 Dec 2023 · No negative marking.

Question 1

+3 marksOne correct option
  1. A

    Only snippet-1 is correct

  2. B

    Only snippet-2 is correct

  3. C

    Both snippets 1 and 2 are correct

  4. D

    Both snippets 1 and 2 are incorrect

Show answer

Correct answer

  • D

    Both snippets 1 and 2 are incorrect

Question 2

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

Correct answer

  • A

Question 3

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

Correct answer

  • A

Question 4

+3 marksOne correct option
  1. A

    Only snippet-1 is correct

  2. B

    Only snippet-2 is correct

  3. C

    Both snippets 1 and 2 are correct

  4. D

    Both snippets 1 and 2 are incorrect

Show answer

Correct answer

  • A

    Only snippet-1 is correct

Question 5

+2 marksOne correct option
  1. A

    Sum of digits in n

  2. B

    Number of digits in n

  3. C

    Product of digits in n

  4. D

    Factorial of n

Show answer

Correct answer

  • B

    Number of digits in n

Question 6

+3 marksOne or more correct options

Select all that apply.

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

Correct answers

  • A
  • B

Question 7

+3 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

+3 marksOne or more correct options

Select all that apply.

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

Correct answers

  • A
  • B

Question 9

+3 marksOne or more correct options

Select all that apply.

  1. A

    This code outputs the sum of all perfect squares less than n

  2. B

    This code outputs the sum of all positive integers whose square is less than n

  3. C

    The output of this code is 28 when the input is 50.

  4. D

    The output of this code is 140 when the input is 50.

Show answer

Correct answers

  • B

    This code outputs the sum of all positive integers whose square is less than n

  • C

    The output of this code is 28 when the input is 50.

Question 10

+2 marksNumerical answer
Show answer

Correct answer: 3

Question 11

+3 marksNumerical answer
Show answer

Correct answer: 5

Question 12

+3 marksNumerical answer
Show answer

Correct answer: 131

Question 13

+3 marksNumerical answer
Show answer

Correct answer: 4

Question 14

+2 marksOne correct option

Based on the above data, answer the given subquestions.

What is the output of the following snippet?

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

Correct answer

  • A

Question 15

+1 markNumerical answer

Based on the above data, answer the given subquestions.

Continuing with the previous subquestion, what is the output of the following snippet?

Enter an integer.

Show answer

Correct answer: 2

Question 16

+3 marksOne correct option

Based on the above data, answer the given subquestions.

What is the given code snippet printing?

  1. A

    It prints the number of button presses after which you reach the floor -1 for the first time.

  2. B

    It prints the number of times you cross the floor -1 .

  3. C

    It prints the final floor level after all the button presses.

Show answer

Correct answer

  • A

    It prints the number of button presses after which you reach the floor -1 for the first time.

Question 17

+2 marksNumerical answer

Based on the above data, answer the given subquestions.

What is the output of this snippet of code?

Show answer

Correct answer: 7

Question 18

+3 marksOne correct option

Based on the above data, answer the given subquestions.

What is the first line of output?

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

Correct answer

  • A

Question 19

+2 marksNumerical answer

Based on the above data, answer the given subquestions.

What is the second line of output?

Show answer

Correct answer: 105