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 4 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 total_stock 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 item_value is calculated by multiplying the stock value by the price value. For example: item_value =(stock[items]* price[items]) 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 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 Programming Questions!