Commit 9a845f69 by BellCodeEditor

save project

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