Q3.Consider the Player dataset given below that keeps track of the runs scored by each player in the test matches held.
The following pseudocode is executed using the "Player" dataset. A player can join a sports club if his runs are above 75 in Trial, TestSeries and WorldCup. The variables `A`, `B` and `C` store the number of players in GoldStriker, SilverStriker and BronzeStriker clubs respectively based on the execution of the pseudocode. Which club will be allotted to a player if he gets 167, 180, 180 runs in Trial, TestSeries and WorldCup respectively?
```
A = 0, B = 0, C = 0
while(Table 1 has more rows){
Read the first row X in Table 1
if(X.Trial > 75 and X.TestSeries > 75 and X.WorldCup > 75){
match = maxMatch(X)
if(match == "WorldCup"){
A = A + 1
}
if(match == "TestSeries"){
B = B + 1
}
if(match == "Trial"){
C = C + 1
}
}
Move X to Table 2
}
Procedure maxMatch(Z)
if(Z.Trial > Z.TestSeries){
if(Z.Trial > Z.WorldCup){
return("Trial")
}
else{
return("WorldCup")
}
}
else{
if(Z.TestSeries > Z.WorldCup){
return("TestSeries")
}
else{
return("WorldCup")
}
}
End maxMatch
```
Save
Check
Details
Q3
16 Jul 2023
Q3.Consider the Player dataset given below that keeps track of the runs scored by each player in the test matches held.
The following pseudocode is executed using the "Player" dataset. A player can join a sports club if his runs are above 75 in Trial, TestSeries and WorldCup. The variables `A`, `B` and `C` store the number of players in GoldStriker, SilverStriker and BronzeStriker clubs respectively based on the execution of the pseudocode. Which club will be allotted to a player if he gets 167, 180, 180 runs in Trial, TestSeries and WorldCup respectively?
```
A = 0, B = 0, C = 0
while(Table 1 has more rows){
Read the first row X in Table 1
if(X.Trial > 75 and X.TestSeries > 75 and X.WorldCup > 75){
match = maxMatch(X)
if(match == "WorldCup"){
A = A + 1
}
if(match == "TestSeries"){
B = B + 1
}
if(match == "Trial"){
C = C + 1
}
}
Move X to Table 2
}
Procedure maxMatch(Z)
if(Z.Trial > Z.TestSeries){
if(Z.Trial > Z.WorldCup){
return("Trial")
}
else{
return("WorldCup")
}
}
else{
if(Z.TestSeries > Z.WorldCup){
return("TestSeries")
}
else{
return("WorldCup")
}
}
End maxMatch
```