Commit 9a845f69 by BellCodeEditor

save project

parent 718cadeb
Showing with 10 additions and 10 deletions
...@@ -4,12 +4,12 @@ class hero: ...@@ -4,12 +4,12 @@ class hero:
self.level=1 self.level=1
self.hp=hp self.hp=hp
self.attack=attack self.attack=attack
def uiop(self):
yase=hero("yase",300,20) self.level=self.level+1
self.hp=self.hp+50
def uiop(): self.attack=self.attack+20
yase.level=yase.level+1 yase = hero("亚瑟",300,20)
yase.hp=yase.hp+50 yase.uiop()
yase.attack=yase.attack+20 print(yase.level)
uiop() print(yase.hp)
uiop() print(yase.attack)
\ No newline at end of file \ 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