
class Resturant:
def _init_(self,nam,type):
self.name=nmae
self.type=type
def describe_restuarant(self):
print(f"The restuarant name is {self.name}")
print(f"The type of restuarant is {self.type}")
restuarant1=Resturant('zzx','china')
restuarant2=Resturant('zzq','west')
restuarant3=Resturant('zp','west')
restuarant1.describe_restuarant
restuarant2.describe_restuarant
restuarant3.describe_restuarant
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/264623.html
標籤:其他開發語言
上一篇:scrapy框架 古詩文網爬取
下一篇:資源異構邊緣設備是什么意思?
