Quiz Space

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

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

Question 4

+4 marksOne correct option

The following pseudocode is executed using the "Scores" dataset. 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. What will Count represent at the end of execution?

text
1 Count = 0
2 while(Table 1 has more rows){
3 Read the first row X from Table 1
4 A = False, B = False, C = False, D = False
5 if(X.Total > AvgT){
6 A = True
7 }
8 if(X.Mathematics < AvgM){
9 B = True
10 }
11 if(X.Physics < AvgP){
12 C = True
13 }
14 if(X.Chemistry < AvgC){
15 D = True
16 }
17 if(A and (B or C or D)){
18 Count = Count + 1
19 }
20 Move X to Table 2
21 }
  1. A

    Count represent the number of students whose total marks are more than the class average (of total marks) but have scored above the subject average in at least one subject

  2. B

    Count represent 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

  3. C

    Count represent the number of students whose total marks are less than the class average (of total marks) but have scored below the subject average in at least one subject

  4. D

    Count represent the number of students whose total marks are more than the class average (of total marks) but have scored below the subject average in all three subjects

Show answer

Correct answer

  • B

    Count represent 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

Question 4 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. Q5Procedure miniSum accepts three numbers as parameters and returns the sum of two smallest numbers.\ Choose the correct …
  5. Q6The following pseudocode is executed using the "Scores" dataset. What will count represent at the end of the execution?
  6. Q7The following pseudocode is executed using the “Scores” dataset. What will A represent at the end of the execution?
  7. Q8The following pseudocode is executed using the “Olympics” dataset. Procedure doSomething accepts a table of rows that c…
  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. …