Commit 32ee8872 by BellCodeEditor

auto save

parent a37588af
Showing with 12 additions and 10 deletions
class student():
class hero():
def __init__(self,a,b,c):
self.name=a
self.height=b
self.weight=c
wanghanling=student("王翰凌","一米三",250)
luohaoen=student("罗浩恩","十公分",49)
liyanqing=student("李衍庆","十米",100000)
print("王翰林的名字:",wanghanling.name)
print("罗浩恩的身高:",luohaoen.height)
print("李衍庆的体重是:",liyanqing.weight)
self.level=a
self.hp=b
self.attack=c
def upgrade():
yase.level+=1
yase.hp+=40
yase.attack+=30
yase=hero(1,500,40)
upgrade()
print(yase.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