Q22Multiple correct6 Marks1 Sep 2024
The following pseudocode is executed using the "Library" dataset. At the end of the execution, A stores a dictionary with the author's name as key and the number of books written by him/her as its value. But the code may have mistakes. Identify all such mistakes (if any). Assume that all statements not listed in the options below are free of errors. It is a Multiple Select Question (MSQ).
```
A = {}
while(Table 1 has more rows){
Read the first row X from Table 1
if(not isKey(A, X.Author)){
A[X.Author] = A[X.Author] + 1
}
else{
A[X.Author] = 1
}
Move X to Table 2
}
```