Q40.The following pseudocode is executed using the "Olympics" dataset. At the end of the execution, `A` stores the number of players who are either female from India or have won the match hosted by Australia in the year 2006, or both. The pseudocode may have mistakes. Identify all such mistakes, if any. Assume that all statements not listed in the options below are free of errors.
```
A = 0
while(Table 1 has more rows){
Read the first row X in Table 1
C = False, D = False
if(X.Gender == "F" and X.HostCountry == "Australia"){
C = True
}
if(X.Year == 2006 and X.Nationality == "India"){
D = True
}
if(C or D){
A = A + 1
}
Move X to Table 2
}
```
Save
Check
Details
Q40
16 Jul 2023
Q40.The following pseudocode is executed using the "Olympics" dataset. At the end of the execution, `A` stores the number of players who are either female from India or have won the match hosted by Australia in the year 2006, or both. The pseudocode may have mistakes. Identify all such mistakes, if any. Assume that all statements not listed in the options below are free of errors.
```
A = 0
while(Table 1 has more rows){
Read the first row X in Table 1
C = False, D = False
if(X.Gender == "F" and X.HostCountry == "Australia"){
C = True
}
if(X.Year == 2006 and X.Nationality == "India"){
D = True
}
if(C or D){
A = A + 1
}
Move X to Table 2
}
```