uiz Space

May 2026 term · Computational Thinking · BSCS1001

Computational Thinking Quiz 2: 16 August 2026 (May 2026 term)

The IIT Madras BS Computational Thinking (Computational Thinking (CT)) Quiz 2 paper sat on 16 Aug 2026, in the May 2026 term: 14 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.

Questions
14
Marks
51
Duration
120 min
MCQ
7
MSQ
4
Written
3

Updated

Official paper: CT 14 Aug 26 · No negative marking.

Question 1

+1 markOne correct option
Figure from the original question paper
Figure from the original question paper
  1. A

    Useful Data has been mentioned above.

  2. B

    This data attachment is just for a reference & not for an evaluation.

Show answer

Correct answer

  • A

    Useful Data has been mentioned above.

Question 2

+5 marksOne correct option

The following pseudocode is executed using the Scores dataset.

What does L contain at the end of the execution?

The following pseudocode is executed using the Scores dataset.
  1. A

    Towns/cities where the highest and second highest total scores among students from that town/city differ by at most 10

  2. B

    Towns/cities where every student has a total score within 10 marks of every other student from that town/city

  3. C

    Towns/cities where the highest and second highest total scores among students from that town/city differ by more than 10

  4. D

    Towns/cities where the first two students read from that town/city differ in total score by at most 10

Show answer

Correct answer

  • A

    Towns/cities where the highest and second highest total scores among students from that town/city differ by at most 10

Question 3

+3 marksOne correct option

The following pseudocode is executed using the Library dataset.

What does D store at the end of the execution?

The following pseudocode is executed using the Library dataset.
  1. A

    For each publisher, the name and year of one of its earliest English books in the dataset

  2. B

    For each publisher, the name and year of one of its latest English books in the dataset

  3. C

    For each publisher, the number of English books published by it

  4. D

    For each publisher, the name and year of its earliest book, irrespective of language

Show answer

Correct answer

  • A

    For each publisher, the name and year of one of its earliest English books in the dataset

Question 4

+3 marksOne correct option

The following pseudocode is executed on the Words dataset.

What does represent at the end of execution?

The following pseudocode is executed on the Words dataset.
  1. A

    Total number of words having at least 8 letters.

  2. B

    Total number of nouns having at least 8 letters.

  3. C

    Total number of sentences having at least 8 words.

  4. D

    Total number of distinct words having at least 8 letters.

Show answer

Correct answer

  • A

    Total number of words having at least 8 letters.

Question 5

+3 marksOne correct option

The following procedure takes a list of integers as input.

What is returned by ?

The following procedure takes a list of integers as input.
  1. A

    —

  2. B

    —

  3. C

    —

  4. D

    —

Show answer

Correct answer

  • B

    —

Question 6

+4 marksOne correct option

The following pseudocode is executed using the Shopping Bills dataset.

What does represent for a category C?

The following pseudocode is executed using the Shopping Bills dataset.
  1. A

    The average price of distinct item names in category C, where each item name is counted once

  2. B

    The average unit price of all purchased units belonging to category C across all bills

  3. C

    The average total bill amount of bills that contain at least one item from category C

  4. D

    The total cost of all items belonging to category C across all bills

Show answer

Correct answer

  • B

    The average unit price of all purchased units belonging to category C across all bills

Question 7

+4 marksOne correct option

The following pseudocode is executed using the Shopping Bills dataset. What will D represent at the end of the execution?

The following pseudocode is executed using the Shopping Bills dataset. What will D represent at the end of the execution
  1. A

    For an item C, and a shop S, is set to True if and only if the item is sold for a constant price

  2. B

    For an item C, and a shop S, is set to True if and only if the item is billed in more than one bill

  3. C

    For an item C, and a shop S, is set to True if and only if the item is sold for variable price

  4. D

    For an item C, and a shop S, is set to True if and only if the item is billed in exactly one bill

Show answer

Correct answer

  • C

    For an item C, and a shop S, is set to True if and only if the item is sold for variable price

Question 8

+4 marksOne or more correct options

The following pseudocode is executed using the Words dataset. Choose all the correct statements.

The following pseudocode is executed using the Words dataset. Choose all the correct statements.

Select all that apply.

  1. A

    counts nouns that are palindromes

  2. B

    Every word in L is a noun such that no pair of letters at symmetric positions (first–last, second–second-last, etc.) is the same.

  3. C

    A word whose is not "Noun" can still increase if the word is a palindrome

  4. D

    A noun with equal to 1 will always increase

Show answer

Correct answers

  • A

    counts nouns that are palindromes

  • B

    Every word in L is a noun such that no pair of letters at symmetric positions (first–last, second–second-last, etc.) is the same.

  • D

    A noun with equal to 1 will always increase

Question 9

+4 marksOne or more correct options

The procedure visitedShop returns the list of names of people who have visited a particular shop in the Shopping Bills dataset. It accepts the shop's name as a parameter. Additionally, each customer must be represented exactly once in the returned list. The following pseudocode may have mistakes. Identify all such mistakes (if any).

The procedure visitedShop returns the list of names of people who have visited a particular shop in the Shopping Bills d

Select all that apply.

  1. A

    Error in line 2

  2. B

    Error in line 6

  3. C

    Error in line 7

  4. D

    Error in line 16

  5. E

    Error in line 18

  6. F

    Error in line 19

  7. G

    No error

Show answer

Correct answers

  • A

    Error in line 2

  • C

    Error in line 7

  • D

    Error in line 16

Question 10

+4 marksOne or more correct options

The following pseudocode is executed on the Scores dataset. Assume uniquely identifies each student.

Which of the following statements are always true?

The following pseudocode is executed on the Scores dataset. Assume  uniquely identifies each student.

Select all that apply.

  1. A

    Every sequence number stored in is also present in .

  2. B

    stores the sequence numbers of students whose Mathematics marks are at least 90.

  3. C

    —

  4. D

    —

Show answer

Correct answers

  • A

    Every sequence number stored in is also present in .

  • B

    stores the sequence numbers of students whose Mathematics marks are at least 90.

  • D

    —

Question 11

+3 marksOne or more correct options

The following pseudocode is executed using the Library dataset. Choose all the correct statements.

The following pseudocode is executed using the Library dataset. Choose all the correct statements.

Select all that apply.

  1. A

    For each genre G, contains each author at most once

  2. B

    For each genre G, is the total number of pages across all books in that genre

  3. C

    If an author has three books in the same genre, at most one of those books contributes to

  4. D

    If an author has more than one book in the same genre with different page counts, may depend on the order in which the rows are read

  5. E

    For each genre G, is the sum of pages of the latest book written by each author in that genre

Show answer

Correct answers

  • A

    For each genre G, contains each author at most once

  • C

    If an author has three books in the same genre, at most one of those books contributes to

  • D

    If an author has more than one book in the same genre with different page counts, may depend on the order in which the rows are read

Question 12

+4 marksWritten answer

Consider the following procedure.

What is returned by

Consider the following procedure.
Consider the following procedure.
Show answer

A written answer, not marked automatically.

Question 13

+4 marksWritten answer

The given pseudocode is executed using a dataset having the same fields as the Words dataset, and contains the following words: "I ordered this product from Gitark. I am very happy to share my review regarding this awesome product. It is not only nice to use, but also has a very cool look. I think this is the best product which can be bought in this price range." Consider the following information: returns a list of unique elements of list L. For example, will return . 1. returns the number of common elements in lists L1 and L2.2. Ignore the upper and lower case, and punctuation symbols while comparing with other 3. words.

What will be the value of posSen at the end of the execution of the above pseudocode?

The given pseudocode is executed using a dataset having the same fields as the Words dataset, and contains the following
Show answer

A written answer, not marked automatically.

Question 14

+5 marksWritten answer

What is the value of S at the end of the execution of the following pseudocode?

What is the value of S at the end of the execution of the following pseudocode?
Show answer

A written answer, not marked automatically.