Question 1
YES
NO
The IIT Madras BS Computational Thinking (Computational Thinking (CT)) Quiz 1 paper sat on 5 Jun 2022, in the May 2022 term, set 2: 16 questions for 52 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.
Kavya used a variable minBillTotal to find the minimum total bill amount using "Shopping Bills" dataset. There are many ways to initialize minBillTotal, choose the correct option(s). It is a Multiple Select Question (MSQ).




Correct answers


There might be some change in the values of both A and N, based on theorder of rows
There might be a change in the value of N, based on the order of rows
There will be NO change in the values of both A and N, based on the order ofrows
There might be a change in the value of A, based on the order of rows
Correct answer
There might be a change in the value of N, based on the order of rows
The following pseudocode is executed using the "Library" dataset. At the end of the execution, A captures the number of books which are published after 2010 or have less than the average number of pages. Assume that the variable Avg holds the value of the average number of pages of the books in the dataset. 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 "Library" dataset. At the end of the execution, A captures the number of books which are published after 2010 or have less than the average number of pages. Assume that the variable Avg holds the value of the average number of pages of the books in the dataset. 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).
Error in Line 5
Error in Line 8
Error in Line 9
Error in Line 12
No error in the code
Correct answers
Error in Line 8
Error in Line 12
The following pseudocode is executed using the "Shopping Bills" dataset. At the end of execution, A captures the lowest price of an item 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. It is a Multiple Select Question (MSQ).
The following pseudocode is executed using the "Shopping Bills" dataset. At the end of execution, A captures the lowest price of an item 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. It is a Multiple Select Question (MSQ).
Line 1: Incorrect initialization of A
Line 6: Incorrect conditional statement
Line 14: Incorrect initialization of minPrice
Line 17: Incorrect conditional statement
There must be a re-initialization of minPrice before the return statement inprocedure findItem
No error in the code
Correct answers
Line 1: Incorrect initialization of A
Line 6: Incorrect conditional statement
Line 14: Incorrect initialization of minPrice
The following pseudocode is executed using the "Words" table. At the end of the execution, C captures the number of pairs of words where both the words have the same part of speech or both words end with a full stop and have the same letter count. Choose the correct code fragment(s) to complete the pseudocode. It is a Multiple Select Question (MSQ).
The following pseudocode is executed using the "Words" table. At the end of the execution, C captures the number of pairs of words where both the words have the same part of speech or both words end with a full stop and have the same letter count. Choose the correct code fragment(s) to complete the pseudocode. It is a Multiple Select Question (MSQ).




Correct answers


Sum of Mathematics marks of students from Chennai
Sum of Mathematics marks of male students from Chennai
Sum of Mathematics marks of male students
Sum of Mathematics marks of male students not from Chennai
Correct answer
Sum of Mathematics marks of male students from Chennai




Correct answer

The following pseudocode is executed using the "Words" dataset. At the end of the execution, A captures the number of sentences with at least two nouns that have at most two vowels. Choose the correct code fragments to complete the pseudocode.
The following pseudocode is executed using the "Words" dataset. At the end of the execution, A captures the number of sentences with at least two nouns that have at most two vowels. Choose the correct code fragments to complete the pseudocode.
Statement1: A = A + 1Statement2: C = 0Statement3: Not requiredStatement4: i = i + 1
Statement1: C = 0Statement2: A = A + 1Statement3: i = i + 1Statement4: Not required
Statement1: C = 0Statement2: A = A + 1Statement3: Not requiredStatement4: i = i + 1
Statement1: A = A + 1Statement2: C = 0Statement3: i = i + 1Statement4: Not required
Correct answer
Statement1: A = A + 1Statement2: C = 0Statement3: Not requiredStatement4: i = i + 1
Let X be a row in the "Words" table. Let isShortVerb be a procedure to find whether the word in the row X is a verb with letter count at most five. Choose the correct code fragment to complete the pseudocode.
Let X be a row in the "Words" table. Let isShortVerb be a procedure to find whether the word in the row X is a verb with letter count at most five. Choose the correct code fragment to complete the pseudocode.




Correct answer

A long word is defined as a word having at least 6 letters. The given pseudocode is used to find the average number of letters per word for long words from the "Words" dataset. Choose the correct code fragment to complete the pseudocode.
A long word is defined as a word having at least 6 letters. The given pseudocode is used to find the average number of letters per word for long words from the "Words" dataset. Choose the correct code fragment to complete the pseudocode.




Correct answer

The following pseudocode is executed using the "Scores" dataset. What will A represent at the end of the execution?
The following pseudocode is executed using the "Scores" dataset. What will A represent at the end of the execution?
Number of students with all subject marks more than 70
Number of students with exactly one subject marks less than 70
Number of students with all subject marks less than 70
Number of students with all subject marks at least 70
Correct answer
Number of students with all subject marks less than 70
The given pseudocode is executed using the "Scores" dataset. There is a hypothesis that if a student performs well overall (i.e., scores at least total 180 marks), then he/she must have performed well in all the subjects (i.e., scored at least 60 marks in each subject). At the end of execution, fracTrue stores the fraction of students who satisfy this hypothesis. Choose the correct code fragment to complete the pseudocode.
The given pseudocode is executed using the "Scores" dataset. There is a hypothesis that if a student performs well overall (i.e., scores at least total 180 marks), then he/she must have performed well in all the subjects (i.e., scored at least 60 marks in each subject). At the end of execution, fracTrue stores the fraction of students who satisfy this hypothesis. Choose the correct code fragment to complete the pseudocode.





Correct answer

The following pseudocode is executed using the "Words" dataset. A counts the number of pairs of words which have equal number of vowels and consonants. 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. It is a Multiple Select Question (MSQ).
The following pseudocode is executed using the "Words" dataset. A counts the number of pairs of words which have equal number of vowels and consonants. 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. It is a Multiple Select Question (MSQ).
Error in Line 5
Error in Line 11
Error in Line 12
Error in Line 16
Error in Line 20
Error in Line 22
Error in Line 28
Error in Line 30
No error in the code
Correct answers
Error in Line 12
Error in Line 16
Error in Line 28
The following pseudocode is executed using the "Scores" dataset. At the end of the execution, A captures the number of female students who are above average in at least one subject. Assume that the variables M, P and C hold the average marks of the subjects Mathematics, Physics and Chemistry respectively. 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 female students who are above average in at least one subject. Assume that the variables M, P and C hold the average marks of the subjects Mathematics, Physics and Chemistry respectively. 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).
Error in Line 4
Error in Line 5
Error in Line 11
Error in Line 12
Multiple return(False) in procedure CheckSomething
No error in the code
Correct answers
Error in Line 5
Error in Line 12