Q19.The given pseudocode is executed using the "Scores" dataset. There is a hypothesis that if a student performs well overall (i.e., scores at least total 180 marks), then he/she must have performed well in all the subjects (i.e., scored at least 60 marks in each subject). At the end of execution, `fracTrue` stores the fraction of students who satisfy this hypothesis. Choose the correct code fragment to complete the pseudocode.
```
countOverall = 0, countPerSub = 0
while(Table 1 has more rows){
Read the first row X in Table 1
if(X.Total >= 180) {
********************
* Fill the code *
********************
}
Move X to Table 2
}
fracTrue = countPerSub / countOverall
```
Save
Check
Details
Q19
23 Feb 2025
Q19.The given pseudocode is executed using the "Scores" dataset. There is a hypothesis that if a student performs well overall (i.e., scores at least total 180 marks), then he/she must have performed well in all the subjects (i.e., scored at least 60 marks in each subject). At the end of execution, `fracTrue` stores the fraction of students who satisfy this hypothesis. Choose the correct code fragment to complete the pseudocode.
```
countOverall = 0, countPerSub = 0
while(Table 1 has more rows){
Read the first row X in Table 1
if(X.Total >= 180) {
********************
* Fill the code *
********************
}
Move X to Table 2
}
fracTrue = countPerSub / countOverall
```