Commit 7328d6b0 by BellCodeEditor

save project

parent d6c81a0f
Showing with 18 additions and 0 deletions
class MINECRAFT:
def __init__(d,name,hp,attack):
d.level=1
d.name=name
d.hp=hp
d.attack=attack
def xjcsm():
xj.level=xj.level+1
xj.hp=xj.hp+50
xj.attack=xj.attack+4
xj=MINECRAFT("diaolin",300,15)
print(xj.hp)
xjcsm()
xjcsm()
print(xj.hp)
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