Commit dcec269a by BellCodeEditor

save project

parent 0dde2af8
Showing with 13 additions and 6 deletions
class sbyhx: class Hero:
HP=10 def __init__(delf,name,hp):
color='blue' delf.name=name
ds=sbyhx() delf.level=2
print(ds.HP) delf.hp=hp
\ No newline at end of file yase=Hero("yase",300)
def sj():
yase.level=yase.level+1
yase.hp=yase.hp+1
sj()
sj()
print("亚瑟的等级",yase.level)
\ 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