Commit ceebc343 by BellCodeEditor

save project

parent 61e79cf5
Showing with 7 additions and 5 deletions
......@@ -4,13 +4,14 @@ class Hero:
self.name=name
self.hp=hp
self.attack=attack
def up(self):
self.sevel+=1
self.hp+=10
self.attack+=1
yase=Hero('亚瑟',300,99999)
yas=Hero('后羿',300,99999)
def up():
yas.sevel+=1
yas.hp+=10
yas.attack+=1
up()
yase.up()
print(yase.hp)
print(yas.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