Q15.The following pseudocode is executed using the "Words" table. At the end of the execution, `count` stores the number of pairs of nouns such that both nouns have either the same letter count or both end with a full stop. Choose the correct code fragment to complete the pseudocode.
```
count = 0
while(Table 1 has more rows){
Read the first row X in Table 1
Move X to Table 2
if(X.PartOfSpeech == "Noun"){
while(Table 1 has more rows){
Read the first row Y in Table 1
Move Y to Table 3
if(***Statement 1***){
if(***Statement 2***){
count = count + 1
}
else{
if(***Statement 3***){
count = count + 1
}
}
}
}
}
Move all rows from Table 3 to Table 1
}
```
Save
Check
Details
Q15
25 Feb 2024
Q15.The following pseudocode is executed using the "Words" table. At the end of the execution, `count` stores the number of pairs of nouns such that both nouns have either the same letter count or both end with a full stop. Choose the correct code fragment to complete the pseudocode.
```
count = 0
while(Table 1 has more rows){
Read the first row X in Table 1
Move X to Table 2
if(X.PartOfSpeech == "Noun"){
while(Table 1 has more rows){
Read the first row Y in Table 1
Move Y to Table 3
if(***Statement 1***){
if(***Statement 2***){
count = count + 1
}
else{
if(***Statement 3***){
count = count + 1
}
}
}
}
}
Move all rows from Table 3 to Table 1
}
```