|
|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
class Restaurant():
def __int__(self, restaurant_name, cuisine_type):
self.restaurant_name = restaurant_name
self.cuisine_type = cuisine_type
def describe_restaurant(self):
print(self.restaurant_name.title())
print(self.cuisine_type)
def cuisine_type(self):
print(cuisine_type + '有这些菜')
def open_restaurant(self):
print(restaurant_name + '正在营业')
restaurant = Restaurant("xiang", "Western-style")
print("The name is " + restaurant.restaurant_name.title() + ".")
print("The restaurant is good at " + restaurant.cuisine_type + ".")
请问各位大神 :
这个程序为何无法运行。提示第16行有问题。 我在int的前后 都有2个下划线的。 不知道是哪里出问题了
|
|