Create a new dictionary called prices_stocks using {} format like the example below.
prices_stocks={}
Put these values in your prices_stocks dictionary:
- "banana": [4,5]
- "apple": [2,2]
- "orange": [1.5,2.5]
- "pear": [3,4]
So the key of dictionary is name of item and value is a list (first element of that list is stock and second element is relevant price)
Loop through each key in prices_stocks, for each key, print out the key along with its price and stock information. Finally calculate how much you earn if you sold all of your products. Print the answer in the following format:
Part-1:
Item: banana Stock: 4 Price: 5
Item: apple Stock: 2 Price: 2
Item: orange Stock: 1.5 Price: 2.5
Item: pear Stock: 3 Price: 4
If you sold all of your items you earn 39.75