Indian Institute of Technology Madras
BS Degree Programme · Examination & Study Paper
BSCS1001 · Computational Thinking
Qualifier · January 2024
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.
- NAT: Numerical response. No negative marking.
- Scientific calculator allowed for all calculations.
- Official answer key is sealed at the end of this sheet.
Useful Reference Data for this Paper

Q1MCQ3 Marks·Choose one optionThe following pseudocode is executed using the “Library” dataset. What will B represent at the end of execution?

- ANumber of books written by author Kalam in English
- BNumber of books not written by author Kalam in English
- CNumber of English books written by authors other than Kalam
- DNumber of books that are written by author Kalam or in English or both
- Q2MCQ3 Marks·Choose one option
The following pseudocode is executed using the "Scores" dataset. At the end of the execution of below pseudocode, if count2 represents the number of male students whose Physics marks are less than or equal to Mathematics marks, then select the correct code fragment for A and B.

- A

- B

- C

- D

- A
- Q3MCQ3 Marks·Choose one option
The following pseudocode is executed using the “Scores” dataset. What will A represent at the end of the execution?

- ANumber of students with highest marks in Mathematics among the three subjects
- BNumber of students with highest marks in Mathematics and lowest marks in Physics
- CNumber of students with highest marks in Chemistry among the three subjects
- DNumber of students with lowest marks in Physics among the three subjects
- Q4MCQ3 Marks·Choose one option
The following pseudocode is executed using the “Words” dataset.
What will count represent at the end of execution?- ANumber of words with at least one pair of vowels occurring consecutively
- BNumber of words with at most two pairs of vowels occurring consecutively
- CNumber of words with at least two pairs of the same vowel occurring consecutively
- DNumber of words with at most two pairs of the same vowel occurring consecutively
- Q5MCQ4 Marks·Choose one option
The following pseudocode is executed using the "Words" table. At the end of the execution, count stores the number of pairs of nouns such that both nouns have either the same letter count or both end with a full stop. Choose the correct code fragment to complete the pseudocode.

- AStatement 1: X.PartOfSpeech == Y.PartOfSpeech Statement 2: X.LetterCount == Y.LetterCount Statement 3: X.Word and Y.Word end with a full stop
- BStatement 1: X.Word and Y.Word end with a full stop Statement 2: X.PartOfSpeech == Y.PartOfSpeech Statement 3: X.LetterCount == Y.LetterCount
- CStatement 1: X.LetterCount == Y.LetterCount Statement 2: X.Word and Y.Word end with a full stop Statement 3: X.PartOfSpeech == Y.PartOfSpeech
- DStatement 1: X.LetterCount == Y.LetterCount Statement 2: X.PartOfSpeech == Y.PartOfSpeech Statement 3: X.Word and Y.Word end with a full stop
- Q6MCQ4 Marks·Choose one option
The following pseudocode is executed using the “Scores” dataset. At the end of the execution,variable Count captures the number of students whose total marks are more than the class average (of total marks) but have scored below the subject average in at least one subject. Assume that the variable AvgT holds the value of the average total marks. Similarly, the variables AvgP,AvgC and AvgM hold the value of the average marks of Physics, Chemistry and Mathematics respectively. Choose the correct code fragment to complete the pseudocode.

- A

- B

- C

- D

- A
- Q7MCQ4 Marks·Choose one option
The following pseudocode is executed using the “Words” dataset. What will A represent at the end of the execution?

- ANumber of sentences with average letter count more than the average letter count of dataset
- BNumber of sentences with average letter count less than the average letter count of dataset
- CNumber of words with average letter count more than the average letter count per word of dataset
- DNumber of words with average letter count less than the average letter count per word of dataset
- Q8MCQ4 Marks·Choose one option
Procedure miniSum accepts three numbers as parameters and returns the sum of two smallest numbers. Choose the correct code fragment to complete the procedure.

- A

- B

- C

- D

- A
- Q9MCQ4 Marks·Choose one option
The following pseudocode is executed using the “Olympics” dataset. Procedure doSomething accepts a table of rows which contains rows of the same player. Assume that the player has won at least two medals and only one medal in any year. What will (B - A) represent at the end of the execution?

- AYear gap between first and second medal won by a player
- BYear gap between first and latest medal won by a player
- CYear gap between latest and second latest medal won by a player
- DYear gap between first and second latest medal won by a player
- Q10MCQ3 Marks·Choose one option
The given pseudocode is executed using the “Olympics” table. What will count represent at the end of the execution? Assume all players have distinct names.

- AThe number of pairs of players having the same nationality or the same medal.
- BThe number of pairs of players having the same nationality and same medal.
- CThe number of players having the same nationality and same medal.
- DThe number of players having the different name but of same nationality.
- Q11MSQ4 Marks·Choose all correct options
The given pseudocode is executed using the “Shopping Bills” dataset. frac stores the ratio of the number of customers who purchased both “Bread” and “Milk” to the number of customers who purchased “Milk”. Choose the correct code fragment(s) of procedure hasItem to complete the pseudocode. (Assume there is at least one customer who has purchased “Milk”).

- A

- B

- C

- D

- A
- Q12MSQ4 Marks·Choose all correct options
The given information represents a "Words" dataset and it may have some mistakes with respect to the sanity of data. Identify all rows with such mistakes.

- ARow 1: Incorrect data type of card number
- BRow 2: Incorrect data type of Word
- CRow 3: Incorrect data type of Part of Speech
- DRow 3: Invalid value of Part of Speech
- ERow 4: Incorrect data type of Letter Count
- FRow 4: Invalid value of Letter Count
- Q13MSQ4 Marks·Choose all correct options
The following pseudocode is executed using the “Scores” dataset. At the end of the execution, count captures the number of pairs of students having either same gender or from the same city but not both. But the pseudocode may have mistakes. Identify all such mistakes (if any). Assume that all statements not listed in the options below are free of errors.

- ALine 13: Incorrect initialisation of B
- BLine 18: Incorrect update of B
- CLine 20: Incorrect condition
- DLine 21: It should return(0)
- Q14NAT3 Marks·Write the number
The following pseudocode is executed using a dataset similar to the "Words" dataset, based on the following paragraph. "Surrounded by nature, Susan often takes a stroll, savoring the soothing sounds of chirping birds.Such moments underline the significance of embracing simple joys in life. Rustlings in the trees suggest squirrels beginning their day, searching for sustenance. Surely, the beauty of a sunrise holds unparalleled magic."
What would be the value of count at the end of the execution of the above pseudocode? Assume that upper case and lower case are ignored during comparison of letters.Your answer: