Computational Thinking, End Term
The following pseudocode is executed using the "Scores" dataset. What will count represent at the end of the execution?
1 count = 0 2 while(Table 1 has more rows){ 3 flag1 = False, flag2 = False 4 Read the first row X in Table 1 5 if(X.Gender == 'F'){ 6 flag1 = True 7 } 8 if(X.CityTown == "Chennai"){ 9 flag2 = True10 }11 if(flag1 == flag2){12 count = count + 113 }14 Move X to Table 215 }The following pseudocode is executed using the "Scores" dataset. What will **count** represent at the end of the execution? 1 count = 0 2 while(Table 1 has more rows){ 3 flag1 = False, flag2 = False 4 Read the first row X in Table 1 5 if(X.Gender == 'F'){ 6 flag1 = True 7 } 8 if(X.CityTown == "Chennai"){ 9 flag2 = True 10 } 11 if(flag1 == flag2){ 12 count = count + 1 13 } 14 Move X to Table 2 15 } The following pseudocode is executed using the "Words" dataset. What will **B** represent at the end of the execution? 1 A = 0, B = 0 2 while(Table 1 has more rows){ 3 Read the first row X in Table 1 4 if(X.LetterCount > 4){ 5 A = A + 1 6 } 7 else{ 8 if(X.PartOfSpeech == "Noun"){ 9 B = B + 1 10 } 11 } 12 Move X to Table 2 13 } 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 most 5, but not both. Choose the correct code fragment to complete the pseudocode. 1 count = 0 2 while(Table 1 has more rows){ 3 Read the first row X in Table 1 4 if(checkSomething(X)){ 5 count = count + 1 6 } 7 Move X to Table 2 8 } 9 10 Procedure checkSomething(Y) 11 A = False, B = False 12 if(X.PartOfSpeech == "Noun"){ 13 A = True 14 } 15 if(X.LetterCount <= 5){ 16 B = True 17 } 18 ********************** 19 *** Fill the code *** 20 ********************** 21 End checkSomething