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