Q26.The following pseudocode is executed using the "Scores" dataset. What will `A` represent at the end of the execution?
```
A = 0
while(Pile 1 has more cards){
Read the top card X from Pile 1
A = A + isInSeq(X)
Move X to Pile 2
}
Procedure isInSeq(X)
if(X.Mathematics > X.Physics){
if(X.Physics < X.Chemistry){
return(1)
}
}
return(0)
End isInSeq
```
Save
Check
Details
Q26
25 Feb 2024
Q26.The following pseudocode is executed using the "Scores" dataset. What will `A` represent at the end of the execution?
```
A = 0
while(Pile 1 has more cards){
Read the top card X from Pile 1
A = A + isInSeq(X)
Move X to Pile 2
}
Procedure isInSeq(X)
if(X.Mathematics > X.Physics){
if(X.Physics < X.Chemistry){
return(1)
}
}
return(0)
End isInSeq
```