Commit 127fbf6b by BellCodeEditor

save project

parent 4a8f0290
Showing with 9 additions and 3 deletions
......@@ -4,7 +4,14 @@ class Fkkh:
self.name=name
self.hp=hp
self.attack=attack
def uperade():
yase.level=yase.level+1
yase.hp=yase.hp+50
yase.attack=yase.attack+4
yase=Fkkh("yase",100,10)
houyi=Fkkh("houyi",90,20)
print(houyi.attack)
print(yase.attack)
\ No newline at end of file
print("等级1生命:",yase.hp)
uperade()
uperade()
print("等级3生命:",yase.hp)
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