Question 4
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?
1 Count = 02 while(Table 1 has more rows){3 Read the first row X from Table 14 A = False, B = False, C = False, D = False5 if(X.Total > AvgT){6 A = True7 }8 if(X.Mathematics < AvgM){9 B = True10 }11 if(X.Physics < AvgP){12 C = True13 }14 if(X.Chemistry < AvgC){15 D = True16 }17 if(A and (B or C or D)){18 Count = Count + 119 }20 Move X to Table 221 }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
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
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
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