Question 1
Yes
No
The IIT Madras BS Computational Thinking (Computational Thinking (CT)) Quiz 1 paper sat on 16 Oct 2022, in the September 2022 term, set 2: 17 questions for 53 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.
Yes
No
Correct answer
Yes
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.
Select the most appropriate datatype specific to "Scores" dataset for the left column.
Select the most appropriate datatype specific to "Scores" dataset for the left column.
a - (3), b - (2), c- (1), d - (4)
a - (1), b - (2), c- (4), d - (3)
a - (2), b - (3), c- (1), d - (4)
a - (2), b - (1), c- (3), d - (4)
Correct answer
a - (3), b - (2), c- (1), d - (4)
The following pseudocode is executed using the "Words" dataset. What will count represent at the end of the execution?
The following pseudocode is executed using the "Words" dataset. What will count represent at the end of the execution?
Number of nouns in the dataset
Number of words before the first noun in the dataset
Number of words after the first noun in the dataset
Number of words except nouns after the first noun in the dataset
Correct answer
Number of words except nouns after the first noun in the dataset
The following pseudocode is executed using the "Scores" dataset. What will count represent at the end of the execution?
The following pseudocode is executed using the "Scores" dataset. What will count represent at the end of the execution?
Number of male students whose Physics marks are greater than Mathematicsmarks
Number of male students whose Physics marks are greater than or equal toMathematics marks
Number of female students whose Physics marks are greater than or equal toMathematics marks
Number of female students whose Physics marks are less than or equal toMathematics marks
Correct answer
Number of male students whose Physics marks are greater than or equal toMathematics marks
The following pseudocode is executed using the "Shopping Bills" dataset. Procedure findCommon takes pair of cards X and Y as input and returns True if the two cards share at least one common item otherwise returns False. What will count represent at the end of the execution?
The following pseudocode is executed using the "Shopping Bills" dataset. Procedure findCommon takes pair of cards X and Y as input and returns True if the two cards share at least one common item otherwise returns False. What will count represent at the end of the execution?
Number of pair of bills with at least one common items
Number of pair of bills from the same shop with at least one common items
Number of pair of bills with at least two common items
Number of pair of bills from the same shop with no common items
Correct answer
Number of pair of bills from the same shop with at least one common items
The following pseudocode is executed using the “Words” dataset. What will count represent at the end of the execution?
The following pseudocode is executed using the “Words” dataset. What will count represent at the end of the execution?
Number of words
Number of duplicate words
Number of pair of unique words
Number of words which occurs only once
Correct answer
Number of words which occurs only once
The following pseudocode is executed using the "Words" table. At the end of the execution, count stores the number of pair of nouns such that both nouns have either same letter count or both end with a full stop. Choose the correct code fragment to complete the pseudocode.
The following pseudocode is executed using the "Words" table. At the end of the execution, count stores the number of pair of nouns such that both nouns have either same letter count or both end with a full stop. Choose the correct code fragment to complete the pseudocode.
Statement 1: X.PartOfSpeech == Y.PartOfSpeechStatement 2: X.LetterCount == Y.LetterCountStatement 3: X.Word and Y.Word end with a full stop
Statement 1: X.Word and Y.Word end with a full stopStatement 2: X.PartOfSpeech == Y.PartOfSpeechStatement 3: X.LetterCount == Y.LetterCount
Statement 1: X.LetterCount == Y.LetterCountStatement 2: X.Word and Y.Word end with a full stopStatement 3: X.PartOfSpeech == Y.PartOfSpeech
Statement 1: X.LetterCount == Y.LetterCountStatement 2: X.PartOfSpeech == Y.PartOfSpeechStatement 3: X.Word and Y.Word end with a full stop
Correct answer
Statement 1: X.PartOfSpeech == Y.PartOfSpeechStatement 2: X.LetterCount == Y.LetterCountStatement 3: X.Word and Y.Word end with a full stop
Sripriya has used a variable max to keep track of the maximum total score to find the maximum total score using “Scores” dataset. There are many ways of initializing max. Choose the correct option(s) regarding the initialization of max. It is a Multiple Select Question (MSQ)
Pick any random card X from the dataset and max = X.Total
Pick the top card X from the dataset and max = X.Total
Initialize max with any value greater than the possible maximum total score
Initialize max with any value less than the possible minimum total score
Correct answers
Pick any random card X from the dataset and max = X.Total
Pick the top card X from the dataset and max = X.Total
Initialize max with any value less than the possible minimum total score
The following pseudocode is executed using the "Scores" dataset. At the end of the execution, count captures the number of girls who scored at least 75 marks in Physics. Choose the correct code fragment(s) to complete the pseudocode. It is a Multiple Select Question (MSQ).
The following pseudocode is executed using the "Scores" dataset. At the end of the execution, count captures the number of girls who scored at least 75 marks in Physics. Choose the correct code fragment(s) to complete the pseudocode. It is a Multiple Select Question (MSQ).




Correct answers


The following pseudocode is executed using the “Scores” dataset. At the end of the execution, A captures the number of students who are male from Bengaluru or have scored less marks in Physics than the average Physics marks. Assume that the variable Avg holds the value of the average Physics marks. 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. It is a Multiple Select Question (MSQ).
The following pseudocode is executed using the “Scores” dataset. At the end of the execution, A captures the number of students who are male from Bengaluru or have scored less marks in Physics than the average Physics marks. Assume that the variable Avg holds the value of the average Physics marks. 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. It is a Multiple Select Question (MSQ).
Line 5
Line 8
Line 11
Line 12
No error in the code
Correct answers
Line 5
Line 8
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. Choose the correct code fragment to complete the pseudocode. It is a Multiple Select Question (MSQ).
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. Choose the correct code fragment to complete the pseudocode. It is a Multiple Select Question (MSQ).




Correct answers


The following pseudocode is executed using the "Library" dataset. Assume that Table 1 contains all the books authored by "Narayan" only. Also assume that the "Year" field of each book item is distinct in the Table.
The following pseudocode is executed using the "Library" dataset. Assume that Table 1 contains all the books authored by "Narayan" only. Also assume that the "Year" field of each book item is distinct in the Table. Which of the following statement(s) are correct at the end of execution of this pseudocode? It is a Multiple Select Question (MSQ).
Table 2 will be empty
Table 3 will have one record corresponding to the most recently publishedbook of "Narayan".
Table 3 will have one record corresponding to the earliest published book of"Narayan".
Table 4 will have one record corresponding to the earliest published book of"Narayan".
Table 4 will have one record corresponding to the most recently publishedbook of "Narayan".
Correct answers
Table 2 will be empty
Table 3 will have one record corresponding to the most recently publishedbook of "Narayan".
The procedure countGirls is executed using the "Scores" dataset which counts the number of girls who have got less than the subject-wise average marks in at least one of the three subjects. Assume that the subject-wise average marks for Physics, Chemistry and Mathematics are stored in variables P,C and M respectively. Choose the correct code fragment(s) to complete the procedure. It is a Multiple Select Question (MSQ).
The procedure countGirls is executed using the "Scores" dataset which counts the number of girls who have got less than the subject-wise average marks in at least one of the three subjects. Assume that the subject-wise average marks for Physics, Chemistry and Mathematics are stored in variables P,C and M respectively. Choose the correct code fragment(s) to complete the procedure. It is a Multiple Select Question (MSQ).




Correct answers



Answer the given subquestions.
The following pseudocode is executed using the “Olympics” dataset. Procedure doSomething accepts a Table of rows which contains rows of same player. Assume that every 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?
The following pseudocode is executed using the “Olympics” dataset. Procedure doSomething accepts a Table of rows which contains rows of same player. Assume that every 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?
Year gap between first and second medal won by a player
Year gap between first and latest medal won by a player
Year gap between latest and second latest medal won by a player
Year gap between first and second latest medal won by a player
Correct answer
Year gap between first and second medal won by a player
Answer the given subquestions.
The following pseudocode is executed on the "Olympics" dataset. Use the procedure doSomething in the previous question. What will count represent at the end of the execution? Assume that every player has won at least two medals and only one medal in a year.
The following pseudocode is executed on the "Olympics" dataset. Use the procedure doSomething in the previous question. What will count represent at the end of the execution? Assume that every player has won at least two medals and only one medal in a year.
Number of players with maximum year gap between first and second medal
Number of players with minimum year gap between first and second medal
Number of players with maximum year gap between latest and second latestmedal
Number of players with minimum year gap between latest and second latestmedal
Correct answer
Number of players with maximum year gap between first and second medal
Answer the given subquestions.
A written answer, not marked automatically.