Question: Imagine you are running a cafe. Create a new Python file in your fold called cafe.py . Create a list called menu, which should contain
Imagine you are running a cafe. Create a new Python file in your fold called cafe.py Create a list called menu, which should contain at least items in the cafe. Next, create a dictionary called stock, which should contain the stock value for each item on your menu. Create another dictionary called price, which should contain the prices for each item on your menu. Next, calculate the totalstock worth in the cafe. You will need to remember to loop through the appropriate dictionaries and lists to do this. Tip: when you loop through the menu list, the items can be set as keys to access the corresponding stock and price values. Each itemvalue is calculated by multiplying the stock value by the price value. For example: itemvalue stockitems priceitems Finally, print out the result of your calculation
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
