Quiz Space

Computational Thinking · Quiz 2 · 16 Aug 2026 · May 2026 term

Question 9: The procedure visitedShop returns the list of names of pe…

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 9 of 14 in the IIT Madras BS Computational Thinking (Computational Thinking (CT)) Quiz 2 paper sat on 16 Aug 2026, in the May 2026 term (CT 14 Aug 26). It carries 4 marks.

More questions from this paper

  1. Q1Figure question
  2. Q2The following pseudocode is executed using the Scores dataset. What does L contain at the end of the execution?
  3. Q3The following pseudocode is executed using the Library dataset. What does D store at the end of the execution?
  4. Q4The following pseudocode is executed on the Words dataset. What does represent at the end of execution?
  5. Q5The following procedure takes a list of integers as input. What is returned by ?
  6. Q6The following pseudocode is executed using the Shopping Bills dataset. What does represent for a category C?
  7. Q7The following pseudocode is executed using the Shopping Bills dataset. What will D represent at the end of the executio…
  8. Q8The following pseudocode is executed using the Words dataset. Choose all the correct statements.
  9. Q10The following pseudocode is executed on the Scores dataset. Assume uniquely identifies each student. Which of the follo…
  10. Q11The following pseudocode is executed using the Library dataset. Choose all the correct statements.
  11. Q12Consider the following procedure. What is returned by
  12. Q13The given pseudocode is executed using a dataset having the same fields as the Words dataset, and contains the followin…
  13. Q14What is the value of S at the end of the execution of the following pseudocode?