#Initialize the dictionary of prices prices = {'apple': 0.40, 'banana': 0.50, 'mango': 0.75, 'pear': 0.10} my_purchase = { 'apple' : 1, 'mango' : 6} #Initialize the grocery bill grocery_bill = 0 #Loop through the items in my purchase, summing the total cost of each for fruit in my_purchase: grocery_bill += prices[fruit] * my_purchase[fruit] print ('I owe the grocer $%.2f' % (grocery_bill))