Sep-20-2020, 03:53 PM
You should have a dictionary named "price" that contains prices for each item. You should have a dictionary named "stock" that contains the stock value for each item. You should have a list called "menu" that is a list of all items. Hard code the dictionaries.
menu = ['Burger','Fries']
price = ['Burger':5.00, 'Fries':1.00]
stock = ['Burger':10, 'Fries':25]
The only time you iterate through menu is when calculating the total stock value.
Do what the assignment says, not what you think the assignment says. Try not to read anything into the problem description. If the assignment does not say "use the menu list to create a price dictionary" then don't do that.
menu = ['Burger','Fries']
price = ['Burger':5.00, 'Fries':1.00]
stock = ['Burger':10, 'Fries':25]
The only time you iterate through menu is when calculating the total stock value.
Do what the assignment says, not what you think the assignment says. Try not to read anything into the problem description. If the assignment does not say "use the menu list to create a price dictionary" then don't do that.