Commit 0310d97e by BellCodeEditor

save project

parent 026abe50
Showing with 9 additions and 8 deletions
......@@ -4,10 +4,11 @@ class Hero:
self.name=name
self.hp=hp
self.attack=attack
yase=Hero("亚瑟",200,10)
print(yase.hp)
def a:
self.level=level+1
self.hp=hp+10
self.attack=attack+5
a()
\ No newline at end of file
yase=Hero(11,200,10)
def upgrade():
yase.name=yase.name+1
yase.hp=yase.hp+10
yase.attack=yase.attack+5
upgrade()
print(yase.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