Quiz Space

Computational Thinking · Qualifier · 22 Dec 2024 · September 2024 term

Question 9: The given pseudocode is executed using the “Olympics” tab…

Question 9

+4 marksOne correct option

The given pseudocode is executed using the “Olympics” table. At the end of execution, count represent the number of pairs of players having the same nationality and same medal. Choose the correct code fragment to complete the pseudocode. Assume all players have distinct names.

text
count = 0
while(Table 1 has more rows){
Read the first row X in Table 1
Move X to Table 2
while(Table 1 has more rows){
Read the first row Y in Table 1
Move Y to Table 3
*******************
***Fill the code***
*******************
}
Move all rows from Table 3 to Table 1
}
  1. A
  2. B
  3. C
  4. D
Show answer

Correct answer

  • D

Question 9 of 12 in the IIT Madras BS Computational Thinking (Computational Thinking (CT)) Qualifier paper sat on 22 Dec 2024, in the September 2024 term (IIT M DS REATTEMPT AN EXAM QDQ1 22 Dec 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 "Scores" dataset. At the end of the execution of below pseudocode, if co…
  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 …
  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?
  8. Q8The following pseudocode is executed using the “Olympics” dataset. Procedure doSomething accepts a table of rows that c…
  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. …