Q8.The following pseudocode is executed using a dataset similar to the "Words" dataset, based on the following paragraph.
"Surrounded by nature, Susan often takes a stroll, savoring the soothing sounds of chirping birds. Such moments underline the significance of embracing simple joys in life. Rustlings in the trees suggest squirrels beginning their day, searching for sustenance. Surely, the beauty of a sunrise holds unparalleled magic."
```
count = 0, flag = True
while(Table 1 has more rows){
Read the first row X in Table 1
Move X to Table 2
if(flag){
if(1st letter of X.Word == 's'){
if(2nd letter of X.Word == 'u'){
count = count + 1
}
}
}
flag = False
if(X.Word ends with full stop){
flag = True
}
}
```
What would be the value of `count` at the end of the execution of the above pseudocode? Assume that upper case and lower case are ignored during comparison of letters.
Save
Check
Details
Q8
25 Feb 2024
Q8.The following pseudocode is executed using a dataset similar to the "Words" dataset, based on the following paragraph.
"Surrounded by nature, Susan often takes a stroll, savoring the soothing sounds of chirping birds. Such moments underline the significance of embracing simple joys in life. Rustlings in the trees suggest squirrels beginning their day, searching for sustenance. Surely, the beauty of a sunrise holds unparalleled magic."
```
count = 0, flag = True
while(Table 1 has more rows){
Read the first row X in Table 1
Move X to Table 2
if(flag){
if(1st letter of X.Word == 's'){
if(2nd letter of X.Word == 'u'){
count = count + 1
}
}
}
flag = False
if(X.Word ends with full stop){
flag = True
}
}
```
What would be the value of `count` at the end of the execution of the above pseudocode? Assume that upper case and lower case are ignored during comparison of letters.