Commit dcec269a by BellCodeEditor

save project

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