Q32Single correct5 Marks3 Sep 2023
The following pseudocode is executed using the "Scores" dataset. What will the value of represent at the end of the execution?
```
cityMarks = {}
while (Table 1 has more rows){
Read the first row X in Table 1
if (isKey(cityMarks, X.CityTown)){
cityMarks[X.CityTown] = cityMarks[X.CityTown] ++ [X.Total]
}
else {
cityMarks[X.CityTown] = [X.Total]
}
Move X to Table 2
}
A = 301, L = []
foreach c in keys(cityMarks){
data = doSomething(cityMarks[c])
B = last(data) - first(data)
if (B == A){
L = L ++ [c]
}
if (B < A){
A = B
L = [c]
}
}
Procedure doSomething(Y)
p = 0, q = 301
foreach k in Y{
if (k > p){
p = k
}
if (k < q){
q = k
}
}
return([p, q])
End doSomething
```