Q33.Consider the "Scores" dataset. What will `C` represent at the end of execution?
```
C = 0
A = DoSomething(Table 1)
while(Table 2 has more rows){
Read the first row X from Table 2
if(X.Physics > A){
C = C + X.Total
}
Move X to Table 1
}
Procedure DoSomething(Table 1)
Sum = 0
n = 0
while(Table 1 has more rows){
Read the first row X in Table 1
Sum = Sum + X.Physics
n = n + 1
Move X to Table 2
}
Avg = Sum / n
return(Avg)
End DoSomething
```
Save
Check
Details
Q33
16 Jul 2023
Q33.Consider the "Scores" dataset. What will `C` represent at the end of execution?
```
C = 0
A = DoSomething(Table 1)
while(Table 2 has more rows){
Read the first row X from Table 2
if(X.Physics > A){
C = C + X.Total
}
Move X to Table 1
}
Procedure DoSomething(Table 1)
Sum = 0
n = 0
while(Table 1 has more rows){
Read the first row X in Table 1
Sum = Sum + X.Physics
n = n + 1
Move X to Table 2
}
Avg = Sum / n
return(Avg)
End DoSomething
```