Computational Thinking, Qualifier
Statement
The following pseudocode is executed using the "Scores" dataset. At the end of the execution of below pseudocode, if count2 represents the number of male students whose Physics marks are less than or equal to Mathematics marks, then select the correct code fragment for A and B.
count1 = 0, count2 = 0while(Table 1 has more rows){ Read the first row X in Table 1 if(....A.... or ....B....){ count1 = count1 + 1 } else{ count2 = count2 + 1 } Move X to Table 2}**Statement** The following pseudocode is executed using the "Scores" dataset. At the end of the execution of below pseudocode, if **count2** represents the number of male students whose Physics marks are less than or equal to Mathematics marks, then select the correct code fragment for **A** and **B**. count1 = 0, count2 = 0 while(Table 1 has more rows){ Read the first row X in Table 1 if(....A.... or ....B....){ count1 = count1 + 1 } else{ count2 = count2 + 1 } Move X to Table 2 } The following pseudocode is executed using the "Words" table. At the end of the execution, **count** stores the number of pairs of nouns such that both nouns have either the same letter count or both end with a full stop. Choose the correct code fragment to complete the pseudocode. count = 0 while(Table 1 has more rows){ Read the first row X in Table 1 Move X to Table 2 if(X.PartOfSpeech == "Noun"){ while(Table 1 has more rows){ Read the first row Y in Table 1 Move Y to Table 3 if(***Statement 1***){ if(***Statement 2***){ count = count + 1 } else{ if(***Statement 3***){ count = count + 1 } } } } Move all rows from Table 3 to Table 1 } } **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. 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 }