1. Price with a default
Write code Easy ✓ CompletedWrite get_price(menu, item) that returns the price of item from the dictionary menu, or 0 if the item isn't on the menu. It must never raise a KeyError.
def get_price(menu, item):
return menu.get(item, 0)
menu = {"tea": 2.5, "cake": 4.0}
print(get_price(menu, "tea"))
print(get_price(menu, "pizza"))