Commit fdba75b4 by BellCodeEditor

save project

parent f51d8c44
Showing with 6 additions and 1 deletions
...@@ -5,5 +5,9 @@ class Heros: ...@@ -5,5 +5,9 @@ class Heros:
self.attack = attack self.attack = attack
self.hp = hp self.hp = hp
wukong = Heros("悟空" , 36 , 500) wukong = Heros("悟空" , 36 , 500)
yase = Heros("亚瑟" , 20 , 800)
def updata():
wukong.hp += 50
updata()
print(wukong.name +"的hp:"+ str(wukong.hp)) print(wukong.name +"的hp:"+ str(wukong.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