Question: Language: Python Program required: Processing 3.0 Purpose: To practice list operations such as adding. removing and finding indices Degree of Difficulty: Moderate The Sesame Street

Language: Python

Program required: Processing 3.0

Language: Python Program required: Processing 3.0 Purpose: To practice list operations suchas adding. removing and finding indices Degree of Difficulty: Moderate The SesameStreet Bakery sells four items at the following prices . Bread ($5)

Purpose: To practice list operations such as adding. removing and finding indices Degree of Difficulty: Moderate The Sesame Street Bakery sells four items at the following prices . Bread ($5) . Doughnut ($2) . Muffin (S3) . Cookie ($1) For this question, you will write a program that allows the user to place an order at the bakery. Here is how your program should behave . Use a 500x500 white canvas as your background . On the left side of the canvas, display the bakery's menu, which consists of the name and price of each item . On the right side of the canvas, display all of the items in the user's order so far. Initially, the order will be empty. It is okay if the order gets too big for the screen: you don't need to handle this case Below the user's order, display the total cost of the entire order. Initially the cost is O for Cookie, etc..) When the user presses the 'b, 'd', 'm' orkeys: Add the appropriate item to the order ('b' for Bread When the user presses the 'u' (for "undo") key: Remove the most recently-added item from the order and adjust the total cost accordingly Menu Your order Bread: $5 Doughnut: $2 Muffin: $3 COOKIE: $1 Bread Doughnut COOkIE Doughnut COOKIE COOKIE COOKIE Cost: $16 Figure 2: A sample order It is not possible to solve this question without making at least some use of lists (in particular, you will need a list to store the order). However, to get full marks for this question, you must make effective use of lists beyond the bare minimum in the following ways

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 Databases Questions!