Commit 4fd17178 by BellCodeEditor

save project

parent cee65e39
Showing with 20 additions and 11 deletions
bro1="刘备" class Hero:
bro2="关羽" def __init__(self,name,hp,attack):
bro3="张飞" self,level = 1
bros = ["刘备""关羽""张飞"] self,name = name i name:名字
bro1=["刘备",161,9.1] self,hp= hp
bro2=["关羽",160,8.5] self,attack=attack i attack:攻击
bro3=["张飞",166,8.3]
bros[0] = "关羽"
bros[0] = "刘备" def upgracte():
print(bros) yase.level=yase.level+1
\ No newline at end of file yase.hp=yase.hp+50
yase.attack=yase.attack+4
yase = Hero("亚瑟",300,20)
print("亚瑟的初始血量是:"yase.hp)
upgratce()
upgratce()
print("")
\ 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