Q49.The following pseudocode is executed using the Words dataset. Assume that rows in Table 1 are arranged in increasing order of sequence number. What will `L` store at the end of execution?
```
L = []
A = "None"
Read the first row X in Table 1
A = X.PartOfSpeech
Move X to Table 2
while(Table 1 has more rows) {
Read the first row Y in Table 1
if(Y.PartOfSpeech == "Noun") {
if(A == "Adjective") {
L = L ++ [Y.Word]
}
}
A = Y.PartOfSpeech
Move Y to Table 2
}
```
Save
Check
Details
Q49
2 Apr 2023
Q49.The following pseudocode is executed using the Words dataset. Assume that rows in Table 1 are arranged in increasing order of sequence number. What will `L` store at the end of execution?
```
L = []
A = "None"
Read the first row X in Table 1
A = X.PartOfSpeech
Move X to Table 2
while(Table 1 has more rows) {
Read the first row Y in Table 1
if(Y.PartOfSpeech == "Noun") {
if(A == "Adjective") {
L = L ++ [Y.Word]
}
}
A = Y.PartOfSpeech
Move Y to Table 2
}
```