Indian Institute of Technology Madras
BS Degree Programme · Examination & Study Paper
BSCS1001 · Computational Thinking
Qualifier · September 2023
Examination Instructions & Guidelines
- Solve on notebook/paper first before checking solutions.
- MCQ: Exactly 1 option is correct. Negative marking applies.
- MSQ: One or more options correct. Select all to score.
- Scientific calculator allowed for all calculations.
- Official answer key is sealed at the end of this sheet.
Useful Reference Data for this Paper

Q1MCQ2 Marks·Choose one option
- A

- B

- C

- D

- E

- A
- Q2MCQ3 Marks·Choose one option

- A

- B

- C

- D

- A
- Q3MCQ4 Marks·Choose one option

- A

- B

- C

- D

- A
- Q4MCQ4 Marks·Choose one option

- A

- B

- C

- D

- A
- Q5MCQ4 Marks·Choose one option

- A

- B

- C

- D

- A
- Q6MCQ4 Marks·Choose one option
What will Count represent at the end of execution?- ANumber of words in which the same vowel occurs consecutively exactly once
- BNumber of words in which the same vowel occurs consecutively at least once
- CNumber of words in which the same vowel occurs consecutively exactly twice
- DNumber of words in which the same vowel occurs consecutively at least twice
- Q7MSQ2 Marks·Choose all correct options

- A

- B

- C

- D

- A
- Q8MSQ4 Marks·Choose all correct options

- A

- B

- C

- D

- A
- Q9MSQ4 Marks·Choose all correct options

- A

- B

- C

- D

- A
- Q10MSQ4 Marks·Choose all correct options

- A

- B

- C

- D

- E

- A
Read the passage below, then answer Q11–Q12

Answer the given subquestions based on the above information.
Q11MCQ3 Marks·Choose one option
- A

- B

- C

- D

- A
- Q12MCQ4 Marks·Choose one option

- A

- B

- C

- D

- A
Read the passage below, then answer Q13–Q14

Based on the above data, answer the given subquestion.
Q13MCQ4 Marks·Choose one option
- A

- B

- C

- D

- A
- Q14MCQ4 Marks·Choose one option

- A

- B

- C

- D

- A
Official KeyMaster Answer Key & Explanations
Official answer keys from IIT Madras BS past papers. Click any question to review.
Reveal KeyCollapse Key
Master Answer Key & Explanations
Official answer keys from IIT Madras BS past papers. Click any question to review.
Detailed Answer Notes & Working
- Q1Answer: A
- a: 2 == 2 is True, so the 'or' is True. b: 2 > 3 is False, so the 'and' is False. c: 2 = 3 tries to assign a value to a number, so it is invalid. d: a number cannot be added to a string, so it is invalid. e: 2 < 3 is True. So a-2, b-3, c-1, d-1, e-2.
- Q2Answer: A
- countT counts books by Narayan and countG counts those books that are Fiction. The procedure returns True when countG / countT ≥ 10/100. So it returns True if at least 10 percent of Narayan's books are Fiction.
- Q3Answer: A
- The first if handles A as the largest, so Sum = B + C. The rest must be in an else: if B is the largest, Sum = A + C, otherwise C is the largest and Sum = A + B. Only option A does this. Without the else, option B overwrites Sum when A is the largest.
- Q4Answer: A
- For each word X, the inner loop moves every later copy of the same word to Table 3 and puts the other words back in Table 1. So Table 2 keeps only the first time each word appears. Removing the repeats gives: she sells seashells by the seashore shells are I'm sure.
- Q5Answer: A
- Lucknow: Saturday = 30 + 20 = 50 and Sunday = 50 + 50 = 100, so it returns Sunday. Chennai: Saturday = 20 + 30 = 50 and Sunday = 30 + 20 = 50. For a tie, countSun ≥ countSat is True, so it also returns Sunday.
- Q6Answer: B
- letter stores the last vowel seen, and A is True when the previous letter was a vowel. C becomes 1 when the current vowel is the same as the vowel just before it, that is, the same vowel occurs twice in a row. Count adds 1 for every word with C = 1, so it counts words where this happens at least once.
- Q7Answer: A, B, C
- To find a maximum, max must start with a value that is not above the real maximum. The Total of any card (random or top) works, because larger totals replace it later. A value below the minimum possible total also works. A value above the maximum is never replaced, so D is wrong.
- Q8Answer: A, B
- countOverall must count every student with Total ≥ 180. countPerSub must count those students who also have at least 60 in all three subjects. Options A and B do this; the order of the two statements does not matter. C and D update countOverall only for students who pass the subject check.
- Q9Answer: D
- Y is read but not moved, so it stays at the top of Table 1 and becomes X in the next round. So every pair of consecutive words is compared, including the last word. Table 2 does not need to be restored to get count, so the pseudocode is correct (assuming countSomething adds 1 to i in its loop).
- Q10Answer: C
- findItem should return the highest price on the card. Line 16 updates maxPrice when maxPrice ≥ Z.Price, which keeps the smaller value. It should be maxPrice < Z.Price. The other lines are correct: findItem is called only for Big Bazaar cards, and Line 6 keeps the larger value in A.
- Q11Answer: A
- i is 0 at the start and becomes 0 again after every full stop. So only the first word of each sentence goes to Table 2. The sentences start with IIT, Anyone, There, There, The, Learners and The. So Table 2 has these seven words.
- Q13Answer: A
- A keeps the smallest year seen. When a smaller year comes, the old A moves to B, and B also takes any year between A and B. So A is the year of the first book and B is the year of the second book of that author. doSomething returns B − A, the gap between the first and second book of the same author.
- Q14Answer: A
- Each round puts all books of one author in Table 2, and Diff is the gap between that author's first and second book. If Diff is larger than max, max is updated and Count is reset to 1. If Diff equals max, Count goes up. So Count is the number of authors with the maximum gap between the first and second book.