Q35.The following pseudocode is executed using the "Scores" dataset. At the end of the execution, `A` captures the number of students who are male from Bengaluru or have scored more marks in Physics than average Physics marks. Assume that `Avg` holds the value of the average Physics marks. The pseudocode may have mistakes. Identify all such mistakes, if any. Assume that all statements not listed in the options below are free of errors.
```
A = 0
while(Table 1 has more rows){
Read the first row X in Table 1
C = False, D = False
if(X.Gender == 'F' and X.CityTown == "Bengaluru"){
C = True
}
if(X.Physics < Avg){
D = True
}
if(C or D){
A = A + 1
}
Move X to Table 2
}
```
Save
Check
Details
Q35
16 Oct 2022
Q35.The following pseudocode is executed using the "Scores" dataset. At the end of the execution, `A` captures the number of students who are male from Bengaluru or have scored more marks in Physics than average Physics marks. Assume that `Avg` holds the value of the average Physics marks. The pseudocode may have mistakes. Identify all such mistakes, if any. Assume that all statements not listed in the options below are free of errors.
```
A = 0
while(Table 1 has more rows){
Read the first row X in Table 1
C = False, D = False
if(X.Gender == 'F' and X.CityTown == "Bengaluru"){
C = True
}
if(X.Physics < Avg){
D = True
}
if(C or D){
A = A + 1
}
Move X to Table 2
}
```