Question: 1 . Start 2 . Create a list of items with their prices. Items = { Item 1 : 5 0 , Item

1. Start2. Create a list of items with their prices. Items ={"Item1": 50, "Item2": 75, "Item3": 100, "Item4": 30}3. Prompt the user to enter their name.4. Display the list of items and their prices.5. Initialize totalCost =0.6. For each item: a. Prompt the user to enter the quantity for that item. b. Calculate the cost for that item: itemCost = price * quantity. c. Add itemCost to totalCost.7. Check if totalCost >200: a. If true, apply 5% discount: finalCost = totalCost *0.95 b. If false, finalCost = totalCost.8. Display the final bill, including: a. Customer name b. Items purchased with quantities and item costs c. Total cost and discount (if applicable)9. Write the bill details to a text file.10. EnD
Write the algorithm

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!