Q25.The given pseudocode is executed using "Scores" dataset. Let `B` be a positive integer. What does the procedure `DoSomething` compute?
```
Procedure DoSomething(B)
C = 0, D = 101
while(Table 1 has more rows){
Read the first row X in Table 1
if(X.Physics > C){
C = X.Physics
}
if(X.Chemistry < D){
D = X.Chemistry
}
Move X to Table 2
}
if(C - D >= B){
return(False)
}
else{
return(True)
}
End DoSomething
```
Save
Check
Details
Q25
7 Jul 2024
Q25.The given pseudocode is executed using "Scores" dataset. Let `B` be a positive integer. What does the procedure `DoSomething` compute?
```
Procedure DoSomething(B)
C = 0, D = 101
while(Table 1 has more rows){
Read the first row X in Table 1
if(X.Physics > C){
C = X.Physics
}
if(X.Chemistry < D){
D = X.Chemistry
}
Move X to Table 2
}
if(C - D >= B){
return(False)
}
else{
return(True)
}
End DoSomething
```