Commit cb58f0c6 by BellCodeEditor

save project

parent c2016c77
Showing with 5 additions and 4 deletions
......@@ -4,12 +4,13 @@ class hero:
self.name=name
self.hp=hp
self.attack=attack
SunWuKong=hero("孙悟空",300,100000)
SunWuKong=hero("孙悟空",400,100000)
yao=hero("瑶",200,50)
print(SunWuKong.hp)
print(yao.hp)
def up():
yao.level+=1
yao.hp+=1000
yao.attack+=500
print(yao.level)
\ No newline at end of file
yao.attack+=50
up()
print(yao.hp)
\ No newline at end of file
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