classRestaurant():def__init__(self,name,cuisine):#初始化
self.name = name
self.type= cuisine
defdescrible_restaurant(self):#描述餐厅print(self.name.title()+" is a "+ self.type+" restaurant.")defopen_restaurant(self):#餐厅正在开业print(self.name.title()+" is "+"open.")
restaurant = Restaurant("yidou","hotpot")print(restaurant.name)print(restaurant.type)
restaurant.describle_restaurant()
restaurant.open_restaurant()