Commit b8d31ef1 by BellCodeEditor

save project

parent ae20c1e4
Showing with 7 additions and 5 deletions
......@@ -4,11 +4,12 @@ class Hero:
self.name=name
self.hp=hp
self.attack=attack
y=Hero('yase',300,20)
def up():
y.level+=1
y.hp+=50
y.attack+=5
def up(q):
q.level+=1
q.hp+=50
q.attack+=5
y=Hero('toi',300,20)
print(y.attack)
up()
print(y.attack)
\ 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