Quiz Space

Computational Thinking · Qualifier · 1 Sept 2024 · May 2024 term

Question 8: The following pseudocode is executed using the "Olympics"…

Question 8

+4 marksOne correct option

The following pseudocode is executed using the "Olympics" dataset. Procedure doSomething accepts a table of rows that contains rows of 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. [MCQ]

text
1 Procedure doSomething(Table T1)
2 A = 2030, B = 2030
3 while(Table T1 has more rows){
4 Read the first row Z from Table T1
5 ****************************
6 ***Fill the code****
7 ****************************
8 Move the row Z to Table T2
9 }
10 return((B - A))
11 End doSomething
  1. A
  2. B
  3. C
  4. D
Show answer

Correct answer

  • A

Question 8 of 12 in the IIT Madras BS Computational Thinking (Computational Thinking (CT)) Qualifier paper sat on 1 Sept 2024, in the May 2024 term (IIT M DS REATTEMPT AN EXAM QDQ1 01 Sep 2024). It carries 4 marks.

More questions from this paper

  1. Q1The given pseudocode is executed using the "Shopping Bills" dataset. frac stores the ratio of the number of customers w…
  2. Q2The following pseudocode is executed using the "Library" dataset. What will B represent at the end of execution?
  3. Q3The following pseudocode is executed using the "Words" dataset. At the end of the execution, count stores the number of…
  4. Q4The following pseudocode is executed using the "Scores" dataset. Assume that the variable AvgT holds the value of the a…
  5. Q5Procedure miniSum accepts three numbers as parameters and returns the sum of two smallest numbers. Choose the correct c…
  6. Q6The following pseudocode is executed using the "Scores" dataset. What will count represent at the end of the execution?…
  7. Q7The following pseudocode is executed using the "Scores" dataset. What will A represent at the end of the execution?[MCQ]
  8. Q9The given pseudocode is executed using the "Olympics" table. At the end of execution, count represent the number of pai…
  9. Q10The following pseudocode is executed using the "Scores" dataset. At the end of the execution of the below pseudocode, i…
  10. Q11The given information represents a "Library" dataset and it may have some mistakes with respect to the sanity of the da…
  11. Q12The following pseudocode is executed using a dataset similar to the "Words" dataset, based on the following paragraph. …