Q2Single correct5 Marks6 May 2026
The following pseudocode is executed using the "Scores" dataset. What will Z represent at the end of the execution?
```
D = {}
A = 0, C = 0
while(Table 1 has more rows){
Read the first row X in Table 1
A = A + X.Physics
C = C + 1
if(isKey(D, X.Town/City)){
D[X.Town/City]["Physics"] = D[X.Town/City]["Physics"] + X.Total
D[X.Town/City]["Count"] = D[X.Town/City]["Count"] + 1
}
else{
D[X.Town/City] = {"Physics": X.Total, "Count": 1}
}
Move X to Table 2
}
PAvg = A / C
Z = 0
foreach B in keys(D){
D[B]["PAverage"] = D[B]["Physics"] / D[B]["Count"]
if(D[B]["PAverage"] > PAvg){
Z = Z + D[B]["Count"]
}
}
```
────────────────────────────────────────