Q7Comprehension3 Marks3 Sep 2023
Passage
The following pseudocode is executed using the "Scores" dataset. Two students form a study pair if the difference of their Physics marks is at most 20. Study the given pseudocode and answer the subquestions.
```
count1 = studyPair(Table 1)
while (Table 1 has more rows){
Read the first row X in Table 1
if(X.CityTown == "Mumbai"){
Move X to Table MUM
}
if(X.CityTown == "Vellore"){
Move X to Table VEL
}
if(X.CityTown == "Kolkata"){
Move X to Table KOL
}
}
count2 = studyPair(Table MUM) + studyPair(Table VEL) + studyPair(Table KOL)
Procedure studyPair(Table 1)
Table T1 = Table 1
A = 0
while(Table T1 has more rows){
Read the first row X in Table T1
Move X to Table T2
while(Table T1 has more rows){
Read the first row Y in Table T1
Move Y to Table T3
if(-20 <= Y.Physics - X.Physics and Y.Physics - X.Physics <= 20){
A = A + 1
}
}
Move all rows from Table T3 to Table T1
}
return(A)
End studyPair
```
What will count1 represent at the end of execution?