Computer Science, asked by willhemcrool739, 6 months ago

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 allanrobertsa
3

Answer:

answer is 126

Explanation:

a=0, b=1000

go through the iterations

a=96, b=30

x=sum (a,b)=126

Answered by steffiaspinno
0

value of X after execution of the following procedure using the “Shopping Bills” dataset will be 126

Explanation:

  • Given x = sum(a, b)
  • Input and output refer to the communication between a computer programme and its user. As input, the user provides something to the programme, and as output, the software provides something to the user.
  • As a result, a software programme is always created to generate some sort of output, which might be textual or graphical in the form if the output is displayed on a screen.
  • A word about "some" output: one of the most fundamental sorts of output is when the computer pauses and accepts or rejects the input.
  • Following the given steps, we reach  a=96, b=30
  • Now from Given, x = sum(a, b) = 126
Similar questions