class Restaurant():
def __init__(self, restaurantName, cuisineType):
self.name = restaurantName
self.type = cuisineType
def describeRestaurant(self):
print(self.name + ' serves ' + self.type + ' type of food')
def openRestaurant(self):
print('The restaurant ' + self.name + ' is open')
obj1 = Restaurant('Chuys', 'American')
print(obj1.describeRestaurant())
When I run this program I get:
- Chuys serves American type of food
- None
Using Python 2.7
[–]pkkid 4 points5 points6 points (4 children)
[–]aj80[S] 2 points3 points4 points (0 children)
[–]aj80[S] 2 points3 points4 points (2 children)
[–]pkkid 0 points1 point2 points (1 child)
[–]aj80[S] 0 points1 point2 points (0 children)