Question 4
Statement
The following pseudocode is executed using the “Words” dataset. What will A represent at the end of the execution?
SumT = 0, CountT = 0, B = 0while(Table 1 has more rows){ Read the first row X in Table 1 CountT = CountT + 1 SumT = SumT + X.LetterCount Move X to Table 2}B = SumT / CountT
SumS = 0, CountS = 0, A = 0, C = 0while(Table 2 has more rows){ Read the first row X in Table 2 CountS = CountS + 1 SumS = SumS + X.LetterCount if(X.Word ends with a full stop){ C = SumS / CountS if(C < B){ A = A + 1 } SumS = 0, CountS = 0 } Move X to Table 1}Number of sentences with average letter count more than the average letter count of dataset
Number of sentences with average letter count less than the average letter count of dataset
Number of words with average letter count more than the average letter count per word of dataset
Number of words with average letter count less than the average letter count per word of dataset