Commit e98201c1 by BellCodeEditor

save project

parent 0e09622a
Showing with 6 additions and 7 deletions
......@@ -6,10 +6,9 @@ class Hero:
self.attack=attack
ys =Hero("亚瑟",120,20)
hy=Hero("后裔",100,23)
print(ys.hp)
print(hy.hp)
def up():
ys.level=ys.lesel+1
ys.hp=ya.hp+50
print(ys.hp)
up
\ No newline at end of file
ys.level=ys.level+1
ys.hp=ys.hp+50
up()
print(ys.hp,ys.level,ys.name)
\ 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