Q38.The following pseudocode is executed using the "Words" dataset. At the end of the execution, `A` captures the number of sentences with at least two nouns that have at most two vowels. Choose the correct code fragments to complete the pseudocode.
```
A = 0, C = 0
while(Table 1 has more rows){
Read the first row X from Table 1
if(X.PartOfSpeech == "Noun" and countVowels(X) <= 2){
C = C + 1
}
if(X.Word ends with a full stop){
if(C >= 2){
*** Statement1 ***
}
*** Statement2 ***
}
Move X to Table 2
}
Procedure countVowels(Y)
I = 1, B = 0
while(I <= Y.LetterCount){
if(Ith letter of Y.Word is a vowel){
B = B + 1
*** Statement3 ***
}
*** Statement4 ***
}
return(B)
End countVowels
```
Save
Check
Details
Q38
5 Jun 2022
Q38.The following pseudocode is executed using the "Words" dataset. At the end of the execution, `A` captures the number of sentences with at least two nouns that have at most two vowels. Choose the correct code fragments to complete the pseudocode.
```
A = 0, C = 0
while(Table 1 has more rows){
Read the first row X from Table 1
if(X.PartOfSpeech == "Noun" and countVowels(X) <= 2){
C = C + 1
}
if(X.Word ends with a full stop){
if(C >= 2){
*** Statement1 ***
}
*** Statement2 ***
}
Move X to Table 2
}
Procedure countVowels(Y)
I = 1, B = 0
while(I <= Y.LetterCount){
if(Ith letter of Y.Word is a vowel){
B = B + 1
*** Statement3 ***
}
*** Statement4 ***
}
return(B)
End countVowels
```