Question 1
123
6
321
1,2,3

The IIT Madras BS Programming in Python (Python) Diploma Entry Qualifier paper sat on 13 Apr 2025, in the January 2025 term: 13 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.
123
6
321
1,2,3
Correct answer
123
If c = 5, then the output generated is "D"
If c = 10, then the output generated is "E"
If c >= 8, then the output is always "D"
If c < 7, then the output generated is always "D"
Correct answer
If c < 7, then the output generated is always "D"
{1: 0, 27: 3, 243: 5, 3: 1, 2187: 7}
{0: 1, 3: 27, 5: 243, 1: 3, 7: 2187}
[(0, 1), (3, 27), (5, 243), (1, 3), (7, 2187)]
[(1, 0), (27, 3), (243, 5), (3, 1), (2187, 7)]
Correct answer
{1: 0, 27: 3, 243: 5, 3: 1, 2187: 7}
1 2 1 3 2 1 4 3 2 1 5 4 3 2 1
5 4 3 2 1 4 3 2 1 3 2 1 2 1 1
1 2 3 4 5 1 2 3 4 1 2 4 1 2 1
1 1 2 1 2 3 1 2 3 4
5 4 3 2 1 4 3 2 1 3 2 1 2 1
Correct answer
5 4 3 2 1 4 3 2 1 3 2 1 2 1 1
Correct answers
Code-1 will throw an error in line-2
Code-2 will throw an error in line-2
Code-3 will throw an error in line-3
Code-1 will run without any error
Code-2 will run without any error
Code-3 will run without any error
Correct answers
Code-1 will throw an error in line-2
Code-2 will throw an error in line-2
Code-3 will run without any error
abcdefgh adgh
perfect prefects
grow rowrowrow
great goodandgreat
Correct answers
abcdefgh adgh
grow rowrowrow
Correct answer: 25
Correct answer: 3
Correct answer: 20
Correct answer: 210
Consider the following snippet of code and answer all the given subquestions :
What is the first line of the output?
10
14
6
18
Correct answer
14
Consider the following snippet of code and answer all the given subquestions :
What is the second line of the output?
6
162
36
48
Correct answer
162