Question 1
The given pseudocode is executed using the "Shopping Bills" dataset. frac stores the ratio of the number of customers who purchased both "Bread" and "Milk" to the number of customers who purchased "Milk". Choose the correct code fragment to complete the pseudocode. (Assume there is at least one customer who has purchased "Milk").
1 mCount = 0, bCount = 02 while(Pile 1 has more cards){3 Read the top card X in Pile 14 ********************5 **Code Fragment**6 *******************7 Move X to Pile 2.8 }9 frac = bCount / mCount1011 Procedure hasItem (Y, A)12 C = False13 while(Card Y has more items){14 Read an item Z from ItemList of card Y15 if(Z.Item == A){16 C = True17 }18 Remove Z from ItemList of Y19 }20 return(C)21 End hasItem