Commit fa78ab85 by BellCodeEditor

save project

parent 881f0a38
Showing with 9 additions and 5 deletions
......@@ -3,10 +3,13 @@ class Hero():
n.level=level
n.hp=hp
n.attck=attck
Tom=Hero(n,1,9,6)
print(Tom)
def up():
n.level=level+1
def up(n):
n.level=level+1
n.hp=hp+2
n.attck=attck+3
up()
Tom=Hero(1,9,6)
Tom.up()
print(Tom.level)
print(Tom.hp)
print(Tom.attck)
\ 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