Computational Thinking, End Term
The following pseudocode is executed using the "Scores" dataset. What will count represent at the end of the execution?
count = 0while(Table 1 has more rows){ flag1 = False, flag2 = False Read the first row X in Table 1 if(X.Gender == 'M'){ flag1 = True } if(X.CityTown == "Chennai"){ flag2 = True } if(flag1 == flag2){ count = count + 1 } Move X to Table 2}The following pseudocode is executed using the "Scores" dataset. What will **count** represent at the end of the execution? count = 0 while(Table 1 has more rows){ flag1 = False, flag2 = False Read the first row X in Table 1 if(X.Gender == 'M'){ flag1 = True } if(X.CityTown == "Chennai"){ flag2 = True } if(flag1 == flag2){ count = count + 1 } Move X to Table 2 } The following pseudocode is executed using the "Words" dataset. What will **B** represent at the end of the execution? A = 0, B = 0 while(Table 1 has more rows){ Read the first row X in Table 1 if(X.PartOfSpeech == "Noun"){ A = A + 1 } else{ if(X.LetterCount > 4){ B = B + 1 } } Move X to Table 2 } The following pseudocode is executed using the "Words" dataset. The variable **count** stores the number of words which are either nouns or have letter count at least 5, but not both. 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 if(checkSomething(X)){ count = count + 1 } Move X to Table 2 } Procedure checkSomething(Y) A = False, B = False if(X.PartOfSpeech == "Noun"){ A = True } if(X.LetterCount >= 5){ B = True } ********************** *** Fill the code *** ********************** End checkSomething