At the burger bar each patty is 8, and cheese (cheese is True) adds 3. Burger already stores the patties and the cheese choice. Finish the method price() so it returns what this burger costs.
burger_price(2, False)→16burger_price(1, True)→11class Burger:
def __init__(self, patties, cheese):
self.patties = patties
self.cheese = cheese
def price(self):
# your code here: work out the price from the patties and cheese, then return it (instead of return 0)
return 0
def burger_price(patties, cheese):
order = Burger(patties, cheese)
return order.price()
Run tries the examples. When they look right, Submit.