Commit 840ced81 by BellCodeEditor

save project

parent d6c81a0f
Showing with 18 additions and 0 deletions
class sword:
def __init__(self,name,damage):
self.level=1
self.name=name
self.damage=damage
def up():
axe.level=axe.level+1
axe.damage=axe.damage+114
axe=sword('axe',200)
print('boy之斧子的伤害是',axe.damage)
up()
up()
print('升级两次后boy之斧子的伤害是',axe.damage)
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