Q23Comprehension2 Marks3 Sep 2023
Passage
The following pseudocode is executed using the "Words" dataset. Study the given pseudocode and answer the subquestions.
```
A = 0, flag = True
outList = [], inList = []
while (Table 1 has more rows){
Read the first row X in Table 1
if (flag){
inList = [X.Word]
flag = False
}
if (X.Word ends with a full stop){
outList = outList ++ [[X.Word] ++ inList]
A = A + 1
inList = []
flag = True
}
Move X to Table 2
}
```
At the end of execution the value of length(outList) will be same as the total number of words in the dataset.