Quiz Space

Computational Thinking · Qualifier · 7 Aug 2022 · May 2022 term

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

Question 4

+3 marksOne or more correct options

The following pseudocode is executed using the "Olympics" dataset. Count represents the number of pairs of distinct players who won the same medal but not in the same sport. Assume that no player won more than one medal. Choose the correct code fragment to complete the pseudocode. It is a Multiple Select Question (MSQ).

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
}

Select all that apply.

  1. A
  2. B
  3. C
  4. D
Show answer

Correct answers

  • B
  • C
  • D

Question 4 of 14 in the IIT Madras BS Computational Thinking (Computational Thinking (CT)) Qualifier paper sat on 7 Aug 2022, in the May 2022 term (IIT M QUALIFIER EXAM QPE 07 Aug 2022 IBA NS). It carries 3 marks.

More questions from this paper

  1. Q1The following pseudocode is executed using the "Words" dataset. What will A represent at the end of execution?
  2. Q2The following pseudocode is executed using the "Olympics" dataset. Assume that no player won more than one medal. What …
  3. Q3The following pseudocode is executed using the "Scores" dataset. What will Count represent at the end of execution? It …
  4. Q5The following pseudocode is executed using the "Words" dataset. Based on the above data, answer the given subquestions.…
  5. Q6The following pseudocode is executed using the "Words" dataset. Based on the above data, answer the given subquestions.…
  6. Q7A palindrome is a sequence of characters which reads the same backward as forward, for example level and noon. The foll…
  7. Q8The following pseudocode is executed using the "Scores" dataset. What will Count represent at the end of execution?
  8. Q9The following pseudocode is executed using the "Scores" dataset. At the end of execution, B captures the minimum Mathem…
  9. Q10The following pseudocode is executed using the "Words" dataset. What will A represent at the end of execution?
  10. Q11The following pseudocode is executed using the "Scores" dataset. What will A represent at the end of execution?
  11. Q12The following pseudocode is executed using the "Scores" dataset. What will (A - B) represent at the end of execution?
  12. Q13A sentence is said to be balanced if there are equal numbers of vowels and consonants in it. The following pseudocode i…
  13. Q14The following pseudocode is executed using the "Olympics" dataset. It counts the number of pairs of players who have th…