Commit 5206efd7 by BellCodeEditor

save project

parent 43a6804b
Showing with 10 additions and 6 deletions
......@@ -4,12 +4,15 @@ class Hero:
a.name=name
a.hp=hp
a.attack=attack
def ab(a):
a.level=a.level+1
a.hp=a.hp+50
a.attack=a.attack+4
yasa=Hero("垭瑟",300,20)
houyi=Hero("后羿",250,23)
def ab():
yasa.level=yasa.level+1
yasa.hp=yasa.hp+50
yasa.attack=yasa.attack+4
ab()
yasa.ab()
houyi.ab()
print(houyi.hp)
print(yasa.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