Quiz Space

Computational Thinking · Qualifier · 16 Mar 2025 · January 2025 term

Question 3: Statement The following pseudocode is executed using the …

Question 3

+4 marksOne correct option

Statement

The following pseudocode is executed using the “Scores” dataset. At the end of the execution, variable Count captures the number of students whose total marks are more than the class average (of total marks) but have scored below the subject average in at least one subject. Assume that the variable AvgT holds the value of the average total marks. Similarly, the variables AvgP, AvgC and AvgM hold the value of the average marks of Physics, Chemistry and Mathematics respectively. Choose the correct code fragment to complete the pseudocode.

text
Count = 0
while(Table 1 has more rows){
Read the first row X from Table 1
A = False, B = False, C = False, D = False
if(X.Total > AvgT){
A = True
}
if(X.Mathematics < AvgM){
B = True
}
if(X.Physics < AvgP){
C = True
}
if(X.Chemistry < AvgC){
D = True
}
********************
* Fill the code *
********************
Move X to Table 2
}
  1. A
  2. B
  3. C
  4. D
Show answer

Correct answer

  • A

Question 3 of 12 in the IIT Madras BS Computational Thinking (Computational Thinking (CT)) Qualifier paper sat on 16 Mar 2025, in the January 2025 term (IIT M QUALIFIER AN EXAM QDQ1 16 Mar 2025). It carries 4 marks.

More questions from this paper

  1. Q1Statement The following pseudocode is executed using the "Scores" dataset. At the end of the execution of below pseudoc…
  2. Q2The following pseudocode is executed using the "Words" table. At the end of the execution, count stores the number of p…
  3. Q4Statement The following pseudocode is executed using the “Words” dataset. What will A represent at the end of the execu…
  4. Q5Statement Procedure miniSum accepts three numbers as parameters and returns the sum of two smallest numbers. Choose the…
  5. Q6Statement The following pseudocode is executed using the “Scores” dataset. What will A represent at the end of the exec…
  6. Q7The given pseudocode is executed using the “Olympics” table. What will count represent at the end of the execution? Ass…
  7. Q8Let X and Y be two rows in the “Scores” table. We call X and Y partially matching if student X and Y are either from th…
  8. Q9Statement The given pseudocode is executed using the “Shopping Bills” dataset. frac stores the ratio of the number of c…
  9. Q10Statement The given information represents a "Words" dataset and it may have some mistakes with respect to the sanity o…
  10. Q11Statement The following pseudocode is executed using the “Scores” dataset. At the end of the execution, count captures …
  11. Q12The following pseudocode is executed using a dataset similar to the "Words" dataset, based on the following paragraph. …