Commit 233b58d8 by BellCodeEditor

save project

parent 22354288
Showing with 21 additions and 0 deletions
class A1:
def __init__(a1,name,hp,atta):
a1.level=1
a1.name=name
a1.hp=hp
a1.atta=atta
def a(a1):
a1.level=a1.level+1
a1.hp=a1.hp+50
a1.atta=a1.atta+4
AY=A1('垭瑟',300,20)
AY.a()
print("等级:",AY.level)
print("血量:",AY.hp)
print("攻击力:",AY.atta)
\ 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