What will be the value of X after execution of the following procedure using the “Shopping Bills” dataset? Step 1. Arrange all cards in a single pile called Pile 1 Step 2. Maintain two variables A, B and initialize them to 0 and 1000 respectively Step 3. If Pile 1 is empty then stop the iteration and start from step 10 Step 4. Read the top card in Pile 1 Step 5. If the bill contains an item “Bananas” then execute step 7 Step 6. If the bill does not contain an item “Bananas” then execute step 9 Step 7. If Price of “Bananas” > A then store Price of “Bananas” in A Step 8. If Price of “Bananas” < B then store Price of “Bananas” in B Step 9. Move the current card to another pile called Pile 2 and repeat from step 3 Step 10. Maintain a variable X and store sum of A and B in it
Answers
Answered by
14
Answer:
A = 8
B = 5
X = 13
Explanation:
A = The highest price of Bananas
B = The lowest price of Bananas
X = The sum of A & B
Similar questions