Question 1
Consider the following code snippet:
What does the code snippet print?
True -4 True 1
False -2 False 0
True -2 False 0
True 0 True 0
Consider the following code snippet:
What does the code snippet print?
True -4 True 1
False -2 False 0
True -2 False 0
True 0 True 0
Consider the following code snippet.
What is the output?
4
10
16
100
It moves all multiples of 3 to the left and all other elements to the right (a partition), without changing the relative order of the non-multiples themselves.
Sign in with Google — it is free — to see every question with its answer and explanation, practise it in learning mode, or take it as a timed mock test.
The IIT Madras BS Programming in Python (Python) End Term paper sat on 13 Sept 2026, in the May 2026 term, set S2: 17 questions for 48 marks in 180 minutes. The first 3 questions are below. Sign in with Google — it is free — to see the whole paper with its answers and explanations, in learning mode or as a timed mock test.
| Feature | Python End Term 13 Sept 2026 Set S2 at a glance |
|---|---|
| Term | May 2026 term |
| Subject | Programming in Python |
| Course code | BSCS1002 |
| Questions | 17 |
| Marks | 48 |
| Duration | 180 min |
| MCQ | 7 |
| MSQ | 3 |
| Numerical | 7 |
| Official paper | Programming in Python 13 Sep 26 (Session 2) |
| Negative marking | No negative marking. |
| Updated |