In Python Propose a menu-driven program that calculates the total price for a picnic lunch that the user is purchasing for a group of friends. The user is first asked to enter her budget for the...


In Python



Propose a menu-driven program that calculates the total price for a picnic lunch that the user is purchasing for a group of friends.



  • The user is first asked to enter her budget for the lunch. She/he has the option of buying apples, cheese, and bread.

  • Set the price per apple, price per pound of cheese, and price per loaf of bread in constant variables.

  • Use a nested repetition/selection structure to ask the user what type of item and how much of each item she would like to purchase.

  • Keep a running total of the items purchased inside the loop. Exit the loop if the total has exceeded the user’s budget. In addition, provide a sentinel value that allows the user to exit the purchasing loop at any time


Either Pseudo code or flow chart



Jun 07, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here