Feb-28-2019, 07:48 AM
Hey buddies , I just tried to work with Dictionaries in Python but I got stuck in trouble with it .
I just wanted to do these with my codes :
.Display the item with quantity and the cost of item in a single line like
The shop have 10 quantities of soap which cost 20.50 USD each.
So I'll be very happy if you can help me with this .
Thanks
# choose any name for the dictionary dictShopping = {'soap': '10' , 'bread': '5' , 'shampoo': '8'} dictSelling = {'soap': '20.50' , 'bread': '25.99' , 'shampoo': '80'} print(' The shopping center have {} quantities of bread which costs {} dollars . '.format(dictSelling,soap))I don't know to to get along with this code to make my program run as well .
I just wanted to do these with my codes :
.Display the item with quantity and the cost of item in a single line like
The shop have 10 quantities of soap which cost 20.50 USD each.
So I'll be very happy if you can help me with this .
Thanks