Commit 36a5a742 by BellCodeEditor

save project

parent 725acefc
Showing with 8 additions and 3 deletions
......@@ -6,5 +6,11 @@ class hero:
self.attack=attack
yase=hero("yase",300,20)
houyi=hero("houyi",240,35)
print("yase hp是",yase.hp)
print("houyi hp是",houyi.hp)
\ No newline at end of file
def sj():
yase.level=yase.level+1
yase.hp=yase.hp+50
yase.attack=yase.attack+20
sj()
sj()
sj()
print(yase.level,yase.hp,yase.attack)
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