Commit ee8ec6e0 by BellCodeEditor

save project

parent 8a36be11
Showing with 6 additions and 2 deletions
...@@ -5,5 +5,9 @@ class hero: ...@@ -5,5 +5,9 @@ class hero:
self.attack = attack self.attack = attack
yase = hero(300,20) yase = hero(300,20)
houyi = hero(210,30) houyi = hero(210,30)
def a():
yase.level = yase.level + 1
yase.hp = yase.hp + 50
yase.attack = yase.attack +5
a()
print(yase.hp) print(yase.hp)
\ No newline at end of file
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