Question: Problem Definition: Create a Python program that sums the order at a hamburger restaurant. If an item is on the menu, it is added to

 Problem Definition: Create a Python program that sums the order at
a hamburger restaurant. If an item is on the menu, it is
added to order, else, feedback is provided saying sorry. This program must
use parallel lists, for in loop, and an if / else structure.
Call your file order.py. Coding: Create three parallel lists: menu, price, and

Problem Definition: Create a Python program that sums the order at a hamburger restaurant. If an item is on the menu, it is added to order, else, feedback is provided saying sorry. This program must use parallel lists, for in loop, and an if / else structure. Call your file order.py. Coding: Create three parallel lists: menu, price, and order. Use the data provided. luems in the menu list: hamburger, soda, fries, chicken nuggets, cotfee, cheeseburger. lhems in the price list: 3.00,1.25,2.00,2.90,90,3.40. Hems in the order list: hamburger, fries, soda, pizza. All the items should be entered in the order provided and in lowercase if string data. Output: Loop through the order and inside the loop check to see if in menu. If in menu, then print it out. Get the index of the menu item and use that to find the price of that item. Print the price for the item. If there is an item that is not on the menu, state that it is not on menu. Finally, print that the order is roady and the price for the whole order. Monoy should be formatted for currency. Your program output should look like the screenshot provided. Problem Detinition: Create a Python program that sums the order at a hamburgor restaurant. If an item is on the menu, it is added to order, else, feedback is provided saying sorry. This program must use parallel lists, for in loop, and an if / else structure. Call your file order.py. Coding: Create three parallel lists: menu, price, and order. Use the data provided. liems in the menu list: hamburger, soda, fries, chicken nuggets, coffeo, cheeseburger. ltems in the price list: 3.00,1.25,2.00,2.90,90,3.40. ltems in the order list: hamburgor, fries, soda, pizz3. All the items should be entered in the order provided and in lowercase it string data. Output: Loop through the order and inside the loop check to see if in menu. If in menu. then print it out. Get the index of the menu litem and use that to find the price of that item. Print the price for the item. If there is an item that is not on the menu, state that it is not on mem. Finally, print that the order is roady and the price for the whole order. Noney should be fomatted for currency. Your program output should look like the screenshot provided. Pseudocode / Comments (Order): F detine lest of menu tems I dodine lest of prices that corespond to monu terna define list containing a customer order inintialiee total pelce to 0.0 * print repert helder - Oreder Detal F ute for in loop to traverse custorter oeder I inside the loop chack to see if order in menu t print mered hem riame I ascign menu Amm index 75 variab. * use index variabio to show frice trom prioe lst A inerement total_price s ese pritit somy ae dont have that item - print onder is ready A print iotul price Sereenshot of output (Order): Order Detail: Adding Hanburger. Price; $3.09 Adding Fries. Pricef $2.00 Adding 5 . Price: $1.25 Sorry, we don "t have pizan. Code Lxameles (Order)= What it wh aoournimer variable? - An aocumsalbr is used to keep a runring total of rombers. - In a logp, a value is usualy adged to the curent vatue of the iscumilaker. - If it is not procerly intialzed, it wil not eentan the comeot total. How do I inilacee the total frice accumuator variable? 9., destare ysur accumsiator variatio ouhside the ioso and increment your accumulater inside your leap. Hew os 1 loep theugit the order? A use low to zat beder - far erdar in-cus tomar ordery Usts in Python shouls be plurat. in tha sbove code you can ate that the mand. lleme ist reds me ist of inand tems. Uists in Pythen should be plural: In the above code you can bee that the menu liems list holds the list of menu damis and the mend prices list holds the priees for each of those itemis. Lets shoud bo plural. These two lists are 'parales lest, You cab use ofher names for rouf lses so long as they comply with coding oonventions and hare mearingty names. Nole that my customer order litt is not plueal because the order contains "a" cuesomer ordor, oo is Oik for in to be singular

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!