Q14.The following pseudocode is executed using the "Shopping Bills" dataset. Assume that the variable `AvgT` holds the value of the average total bill amount. What will `Q` represent at the end of execution?
```
P = 0, Q = 0
while(Table 1 has more rows){
Read the first row X in Table 1
if(X.TotalBillAmount <= AvgT){
P = P + 1
}
else{
if(X.ShopName == "Big Bazaar" or X.ShopName == "SV Stores"){
Q = Q + 1
}
}
}
```
Save
Check
Details
Q14
27 Oct 2024
Q14.The following pseudocode is executed using the "Shopping Bills" dataset. Assume that the variable `AvgT` holds the value of the average total bill amount. What will `Q` represent at the end of execution?
```
P = 0, Q = 0
while(Table 1 has more rows){
Read the first row X in Table 1
if(X.TotalBillAmount <= AvgT){
P = P + 1
}
else{
if(X.ShopName == "Big Bazaar" or X.ShopName == "SV Stores"){
Q = Q + 1
}
}
}
```