Q20Single correct5 Marks1 Sep 2024
The following pseudocode is executed using the "Scores" dataset. What will represent at the end of execution?
```
cityD = {}
while(Table 1 has more rows){
Read the first row X in Table 1
if(isKey(cityD, X.Town/City)){
if(isKey(cityD[X.Town/City], X.Gender)){
if(cityD[X.Town/City][X.Gender] > X.Physics){
cityD[X.Town/City][X.Gender] = X.Physics
}
}
else{
cityD[X.Town/City][X.Gender] = X.Physics
}
}
else{
cityD[X.Town/City] = {}
cityD[X.Town/City][X.Gender] = X.Physics
}
Move X to Table 2
}
```