Commit 41d24dac by BellCodeEditor

save project

parent 0696b086
Showing with 9 additions and 4 deletions
...@@ -4,7 +4,13 @@ class Hero: ...@@ -4,7 +4,13 @@ class Hero:
self.name=name self.name=name
self.hp= hp self.hp= hp
self.attack=attack self.attack=attack
def unnag():
yase.level=yase.level+1
yase.hp=yase.hp+50
yase.attack=yase.attack+4
yase = Hero("呀瑟",300,40) yase = Hero("呀瑟",300,40)
dayi = Hero("大邑",277,31) print("yase hp",yase.hp)
print("h",yase.hp) unnag()
print("k",dayi.hp) unnag()
\ No newline at end of file print("yaseX2 hp",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