Question: Language: Python Purpose: Practice using loops and simple information visualization Degree of Difficulty: Moderate. For this question, you will create a Processing program that visualizes
Language: Python


Purpose: Practice using loops and simple information visualization Degree of Difficulty: Moderate. For this question, you will create a Processing program that visualizes placing a simple fast food order at a drive-thru restaurant. Our restaurant in this question serves only two items: hamburgers and fries. Your program should allovw the user to select how many of each item they want and should update its canvas with pictures of the appropriate number of items. Your program should have the following specific behaviour: . Use a 600x600 white canvas as the backdrop Pressing the'b' key increases the number of burgers in the order by 1: 'V decreases it by 1. Make sure . Pressing the .f key increases the number of fries in the order by 1:d. decreases it by 1 Again, no At all times, the program should visually display the order, i.e. there should be 1 hamburger on the Initially the number of burgers and fries in the order are both O. the number of burgers in the order cannot go negative. negatives screen for each hamburger in the order and similarly for the fries. You will need to use loops to do this. Start displaying the items in the order near the top-left corner of the canvas and fill up the canvas one row of items at a time. If a row fills up, start displaying the items on the next row and continue doing so as needed. If there are both burgers and fries in the order, the burgers should be displayed first. Begin displaying fries on a separate row from the burgers (even if the burgers don't entirely fill up a row; see example below) It is okay if the order gets so big that it starts going off the bottom of the canvas; you do not need to handle this case. Here is an example of what your program might look like
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
