Q12.The following pseudocode is executed using the "Words" table. At the end of the execution, `count` stores the number of pairs of verbs such that both verbs have either the same letter count or both end with a full stop, but not both. 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 == "Verb"){
while(Table 1 has more rows){
Read the first row Y in Table 1
Move Y to Table 3
if(X.PartOfSpeech == Y.PartOfSpeech){
******************************
********Fill the code********
******************************
}
}
}
Move all rows from Table 3 to Table 1
}
```
Save
Check
Details
Q12
7 Jul 2024
Q12.The following pseudocode is executed using the "Words" table. At the end of the execution, `count` stores the number of pairs of verbs such that both verbs have either the same letter count or both end with a full stop, but not both. 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 == "Verb"){
while(Table 1 has more rows){
Read the first row Y in Table 1
Move Y to Table 3
if(X.PartOfSpeech == Y.PartOfSpeech){
******************************
********Fill the code********
******************************
}
}
}
Move all rows from Table 3 to Table 1
}
```