Commit 2dc276ef by BellCodeEditor

save project

parent f47689a4
Showing with 11 additions and 0 deletions
class hero():
def __init__(self,lv,hp,att,name):
self.lv=lv
self.hp=hp
self.att=att
self.name=name
yase=hero(5,500,30,'yase')
houyi=hero(5,350,50,'houyi')
print(f'lv:{yase.lv} hp:{yase.hp} att:{yase.att} name:{yase.name}')
print(f'lv:{houyi.lv} hp:{houyi.hp} att:{houyi.att} name:{houyi.name}')
\ 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