Commit cc56c5f1 by BellCodeEditor

save project

parent f0aaf9d8
Showing with 5 additions and 3 deletions
......@@ -4,12 +4,13 @@ class Hero:
self.name=name
self.hp=hp
self.attack=attack
dream=Hero("dream",300,100)
def levelup(name):
name.level+=1
name.hp*=1.2
name.attack+=20
dream=Hero("dream",300,100)
levelup(dream)
sub=Hero("sub",260,120)
levelup()
print(dream.hp)
print(dream.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