Question 1
Useful Data has been mentioned above.
This data attachment is just for a reference & not for an evaluation.

The IIT Madras BS Computational Thinking (Computational Thinking (CT)) Quiz 1 paper sat on 19 Jul 2026, in the May 2026 term: 13 questions for 51 marks in 120 minutes. Every question is below with its answer. Take it as a timed mock test to be marked, or read it through first.
Useful Data has been mentioned above.
This data attachment is just for a reference & not for an evaluation.
Correct answer
Useful Data has been mentioned above.
The following pseudocode is executed using the Word dataset. What will count represent at the end of the execution?
Number of words which are nouns and have at most four letters
Number of words which are either not nouns or have at least four letters but not both
Number of words which are either nouns or have at most four letters or both
Number of words which are nouns and have at least four letters
Correct answer
Number of words which are nouns and have at least four letters
The following pseudocode is executed on the "Library" dataset. What will count represent after the pseudocode below is executed?
Number of book pairs that have different authors but are written in the same language
Number of book pairs that have different authors and languages
Number of book pairs that have the same author but are in different languages
Number of book pairs that have same author and are in the same language
Correct answer
Number of book pairs that have different authors but are written in the same language
Statement The following pseudocode is executed using the "Words" dataset. At the end of the execution, count stores the number of pairs of verbs such that both verbs have either different letter counts or both end with a full stop. Choose the correct code fragment to complete the pseudocode.
Statement 1: X.PartOfSpeech == "Verb" Statement 2: X.PartOfSpeech == Y.PartOfSpeech Statement 3: X.Word and Y.Word end with a full stop
Statement 1: X.PartOfSpeech == Y.PartOfSpeech Statement 2: X.PartOfSpeech == "Verb" Statement 3: X.Word and Y.Word end with a full stop
Statement 1: X.PartOfSpeech == "Verb" Statement 2: X.Word and Y.Word end with a full stop Statement 3: X.PartOfSpeech == Y.PartOfSpeech
Statement 1: X.Word and Y.Word end with a full stop Statement 2: X.PartOfSpeech == Y.PartOfSpeech Statement 3: X.PartOfSpeech == "Verb"
Correct answer
Statement 1: X.PartOfSpeech == "Verb" Statement 2: X.PartOfSpeech == Y.PartOfSpeech Statement 3: X.Word and Y.Word end with a full stop
Match the following expressions in the Column 1 with the appropriate values in Column 2.
a - (3), b - (2), c - (2), d - (5), e - (3)
a - (1), b - (3), c - (2), d - (1), e - (2)
a - (3), b - (2), c - (1), d - (3), e - (2)
a - (1), b - (3), c - (2), d - (1), e - (1)
Correct answer
a - (3), b - (2), c - (1), d - (3), e - (2)
The following pseudocode is executed using the “Scores” dataset.
Which of the following statements is correct?
A represents the number of female students whose total marks are at least 250.
B represents the number of female students whose total marks are less than 250.
B represents the number of students whose total marks are less than 250.
A represents number of male students whose total marks are at most 250..
Correct answer
B represents the number of female students whose total marks are less than 250.
The following pseudocode is executed using the Shopping Bills dataset. At the end of the execution, A captures the lowest price across all items purchased from Big Bazaar. But the pseudocode may have mistakes in one or more lines. Identify all such lines (if any). Assume that all statements not listed in the options below are free of errors.
Line 1: Incorrect initialization of A
Line 6: Incorrect conditional statement
Line 14: Incorrect initialization of minPrice
Line 17: Incorrect conditional statement
Correct answers
Line 6: Incorrect conditional statement
Line 14: Incorrect initialization of minPrice
Statement The following pseudocode is executed using a dataset similar to the "Words" dataset, based on the following paragraph. "Mountains often appear calm from a distance, hiding their rugged terrain. Moments of reflection help people understand themselves better. The evening breeze carried the scent of flowers across the valley. Morning walks encouraged Rahul to maintain a healthy routine. Birds chirped softly as the sun rose above the horizon."
What would be the value of count at the end of the execution of the pseudocode above ? Assume that upper case and lower case are ignored during comparison of letters.
A written answer, not marked automatically.
Statement The following pseudocode is executed using the “Scores” dataset. What will A represent at the end of the execution?
Number of students with highest marks in Physics among the three subjects
Number of students with highest marks in Physics and lowest marks in Mathematics
Number of students with highest marks in Chemistry among the three subjects
Number of students with lowest marks in Mathematics among the three subjects
Correct answer
Number of students with highest marks in Physics among the three subjects
Statement The following pseudocode is executed using the “Olympics” dataset. Procedure doSomething accepts a table where all rows belong to the same player. Assume that the player has won at least two medals and only one medal in any year. At the end of the execution, if (B - A) represents year the gap between first and second medals won by a player then, choose the correct code fragment to complete the pseudocode.




Correct answer

Statement The following procedure is executed using "Words" dataset. What will A represent at the end of the execution? Step 1. Arrange all cards in a single pile called Pile 1 Step 2. Maintain two variables A, B and initialize them to 0 Step 3. If Pile 1 is empty then stop the iteration Step 4. Read the top card in Pile 1 Step 5. Increment variable B Step 6. If Word does not end with a full stop then execute step 9 Step 7. If Word ends with a full stop and B > A then store B in A Step 8. Re-initialize the variable B to 0 Step 9. Move the current card to another pile called Pile 2 and repeat from step 3
Length of the shortest sentence based on the number of words
Length of the longest sentence based on the number of words
Length of the longest sentence based on the number of letters
Length of the shortest sentence based on the number of letters
Correct answer
Length of the longest sentence based on the number of words
Statement A pair of words is said to be special if it fulfills following conditions: The number of vowels are the same in both words and the number of consonants are not the same in both words. The given pseudocode is executed using the “Words” dataset. The variable count in the given pseudocode counts the number of special pairs. Choose the correct code fragment to complete the pseudocode.




Correct answer

Statement A student proposed a hypothesis that fewer students are born in the first half of the year than the second half of the year. She wrote the following procedure which uses the “Scores” dataset to verify the hypothesis. However, the procedure may contain some errors. Find out the errors if present. Step 1: Arrange all cards in a single pile called Pile 1 Step 2: Maintain two variables A and B and initialize them to 0 Step 3: If Pile 1 is empty then stop the iteration and start from Step 8 Step 4: Read the top card in Pile 1 Step 5: If the Date of Birth is from 1st January to 30th June then increment A Step 6: If the Date of Birth is from 1st July to 31st December then increment B Step 7: Move the current card to another pile called Pile 2 and repeat from Step 3 Step 8: If A > B then declare the hypothesis to be True Step 9: If A ≤ B then declare the hypothesis to be False
Step 5 to increment A is incorrect
Step 6 to increment B is incorrect
Step 8 to declare the hypothesis as True is incorrect
Step 9 to declare the hypothesis as False is incorrect
The procedure is free of errors
Correct answers
Step 8 to declare the hypothesis as True is incorrect
Step 9 to declare the hypothesis as False is incorrect