Question: code in python! Create a dictionary to hold the prices of fruit: Bananas cost $1.5 a pound, apples $2.3 a pound, oranges cost $4.5 a
code in python!
- Create a dictionary to hold the prices of fruit: Bananas cost $1.5 a pound, apples $2.3 a pound, oranges cost $4.5 a pound and cherries cost $6 a pound.
- Create another dictionary to hold the stock of each fruit: You have 35 pounds of bananas, 42 pounds of apples, 40 pounds of oranges and 12 pounds of cherries.
- Display the data in a table format as such:
Fruit Price Stock
Banana 1.5 35
Apple 2.3 42
..
- Calculate the total value we have of each fruit and the total value of the whole shop.
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
