Commit 8fbe0c5b by BellCodeEditor

save project

parent d009b202
Showing with 15 additions and 26 deletions
class yuxiaozhe: class Hero:
def__init__(self,sb,sbb,sbbb) def __init__(self,name,hp,attack):
self.sb=sb self.level=1
self.sbb=sbb self.name=name
self.sbbb=sbbb self.hp=hp
wangbadan=yuxiaozhe('小花生'999,6789) self.attack=attack
yuxiaozhe('不灭蜥蜴'9999,682) def upgrade():
print(yuxiaozhe.sb) yase.level=yase.level+1
yase.hp=yase.hp+100
yase.attack=yase.attack+50
yase = Hero("亚瑟",200,200)
print("亚瑟的攻击力:",yase.attack)
upgrade()
print("亚瑟的攻击力:",yase.attack)
\ 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