Q10.The following pseudocode is executed using the "Words" dataset. Consider that procedure `vCount` returns the number of vowels and procedure `cCount` returns the number of consonants. What will `count` represent at the end of execution?
```
count = 0
Q = True
while(Table 1 has more rows){
Read the first row X in Table 1
Move X to Table 2
while(Table 1 has more rows){
Read the first row Y in Table 1
Move Y to Table 3
if(vCount(X) != vCount(Y)){
Q = False
}
if(cCount(X) != cCount(Y)){
Q = False
}
if(Q){
count = count + 1
}
}
Move all rows of Table 3 to Table 1
}
```
Save
Check
Details
Q10
23 Feb 2025
Q10.The following pseudocode is executed using the "Words" dataset. Consider that procedure `vCount` returns the number of vowels and procedure `cCount` returns the number of consonants. What will `count` represent at the end of execution?
```
count = 0
Q = True
while(Table 1 has more rows){
Read the first row X in Table 1
Move X to Table 2
while(Table 1 has more rows){
Read the first row Y in Table 1
Move Y to Table 3
if(vCount(X) != vCount(Y)){
Q = False
}
if(cCount(X) != cCount(Y)){
Q = False
}
if(Q){
count = count + 1
}
}
Move all rows of Table 3 to Table 1
}
```