Commit 2e64ae7b by BellCodeEditor

auto save

parent d493d152
Showing with 18 additions and 0 deletions
class hero:
def __init__(self,name,hp,attack):
self.mingzi=name
self.xueliang=hp
self.gongjizhi=attack
yase=hero("夜色",100,200)
yase.mingzi="呼呼"
print("血量是"+str(yase.xueliang))
print()
class cake:
def __init__(self,chess,fruit,size):
self.you=chess
self.shuigui=fruit
self.chicun=size
cake1=cake("pure","apple",20)
print("尺寸是"+str(cake1.chicun))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment