Question: Define the following two dictionaries: Loop through each key in prices. For each key, print out the key along with its price and stock information.

Define the following two dictionaries:
Loop through each key in prices. For each key, print out the key along with its price and
stock information. Print the answer in the following format:
Let's determine how much money you would make if you sold all your food.
Create a variable called total and set it to zero.
Loop through the prices dictionaries. For each key in prices, multiply the
number in prices by the number in stock. Print that value into the console and
then add it to total.
Finally, outside your loop, print total.

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!