Commit 8fbe0c5b by BellCodeEditor

save project

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