Q27.The following pseudocode is executed using the "Words" dataset. What will `A` represent at the end of the execution?
```
SumT = 0, CountT = 0, B = 0
while(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 = 0
while(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
}
```
Save
Check
Details
Q27
25 Feb 2024
Q27.The following pseudocode is executed using the "Words" dataset. What will `A` represent at the end of the execution?
```
SumT = 0, CountT = 0, B = 0
while(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 = 0
while(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
}
```