Quiz Space

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

Question 9: The following pseudocode is executed using the "Scores" d…

Question 9

+4 marksOne correct option

The following pseudocode is executed using the "Scores" dataset. At the end of execution, B captures the minimum Mathematics marks of a student whose
(i) Total marks is more than the average total marks
(ii) Mathematics marks is more than Physics and Chemistry marks
Assume that the variable Avg holds the value of the average total marks. Choose the correct code fragment to complete the pseudocode.

text
while (Table 1 has more rows) {
Read the first row X in Table 1
********************
* Fill the code *
********************
}
B = 101
while (Table 3 has more rows) {
Read the first row X in Table 3
if (X.Total > Avg and X.Mathematics < B) {
B = X.Mathematics
}
Move X to Table 2
}
  1. A
  2. B
  3. C
  4. D
Show answer

Correct answer

  • A

Question 9 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 4 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. Q4The following pseudocode is executed using the "Olympics" dataset. Count represents the number of pairs of distinct pla…
  5. Q5The following pseudocode is executed using the "Words" dataset. Based on the above data, answer the given subquestions.…
  6. Q6The following pseudocode is executed using the "Words" dataset. Based on the above data, answer the given subquestions.…
  7. Q7A palindrome is a sequence of characters which reads the same backward as forward, for example level and noon. The foll…
  8. Q8The following pseudocode is executed using the "Scores" dataset. What will Count represent at the end of execution?
  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…