Commit 652f767a by BellCodeEditor

save project

parent 7328d6b0
Showing with 8 additions and 18 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)
class fkkh:
def __init__(self):
self.level=1
self.hp=100
self.attack=300
yase=fkkh()
print(yase.hp)
\ 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