Oct-07-2018, 03:11 PM
class Restaurant(): """Restaurant example""" def __init__(self, restaurant_name, cuisine_type): """Initialize restaurant name and cuisine type attributes""" self.name = restaurant_name self.type = cuisine_type def describe_restaurant(self): """Tells the name and type of restaurant""" print(self.name.title() + " has" + self.type.title() + " food.") def open_restaurant(self): """Tells that the restaurant is open""" print(self.name.title() + " is now open!") print(describe_restaurant('saltgrass', 'steak')) print(open_restaurant('saltgrass'))traceback (most recent call last):
File "Restaurant", line 17, in <module>
print(describe_restaurant('saltgrass', 'steak'))
NameError: name 'describe_restaurant' is not defined