Commit b047f7f5 by BellCodeEditor

save project

parent d12f43bc
Showing with 7 additions and 2 deletions
......@@ -4,6 +4,11 @@ class hero:
self.level=1
self.hp=hp
self.attack=attack
def upgrade():
self.level=self.level+1
self.hp=self.hp+50
self.attack=self.attack+4
yase=hero("亚瑟",300,20)
houyi=hero("后羿",250,23)
print(houyi.hp)
\ No newline at end of file
upgrade()
print(houyi,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