Sun Apr 16 08:27:00 UTC 2023 inscode

上级 df352508
print('欢迎来到 InsCode')
\ No newline at end of file
class Name:
def __init__(self,name):
self.name = name
def sayHello(self):
print("hello",self.name)
class Age:
def __init__(self,age):
self.age = age
def sayHello(self):
print("hello",self.age)
class User(Name,Age):
def __init__(self,name,age):
self.name = name
self.age = age
def sayHello(self):
print("hello",self.name,"今年",self.age,"岁")
cty = User("陈天羽",22)
cty.sayHello()
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册