Computational Thinking, End Term
The following pseudocode is executed using the "Scores" dataset.
A = 0, B = 0while (Table 1 has more rows) { Read the top row X from Table 1 if (X.Gender == 'M') { A = A + 1 } else { if (X.Gender == 'M' or X.CityTown == "Chennai") { B = B + 1 } } Move X to Table 2}What will B represent at the end of execution of pseudocode?
The following pseudocode is executed using the "Scores" dataset. A = 0, B = 0 while (Table 1 has more rows) { Read the top row X from Table 1 if (X.Gender == 'M') { A = A + 1 } else { if (X.Gender == 'M' or X.CityTown == "Chennai") { B = B + 1 } } Move X to Table 2 } What will **B** represent at the end of execution of pseudocode? The following pseudocode is executed using the "Words" dataset. What does **count** represent at the end of execution? A = False, B = False, count = 0 while (Table 1 has more rows) { Read the first row X from Table 1 if (X.PartOfSpeech == "Pronoun") { A = True } if (X.PartOfSpeech == "Noun") { B = True } if (X.PartOfSpeech == "Adjective") { if (A and B) { count = count + 1 } } Move the row X to Table 2 } The following pseudocode is executed using the "Library" dataset. What does (**count−A+B**) represent at the end of execution? A = 0, B = 0, count = 0 while (Table 1 has more rows) { Read the first row X from Table 1 if (X.Genre == "Fiction") { A = A + 1 if (X.language == "English") { B = B + 1 } } count = count + 1 Move the row X to Table 2 }