Commit ea691e3c by BellCodeEditor

save project

parent ef32e263
Showing with 9 additions and 11 deletions
class Hero:
def __init__(self,name,hp,attack):
self.level=1
self.name=name
self.hp=hp
self.attack=attack
hero01=Hero('亚瑟',200,30)
hero01.hp=350
print('英雄的名字为: '+hero01.name)
print('英雄的血量为: '+str(hero01.hp))
\ No newline at end of file
class hero:
def__init__(self):
self.level=10000000
self.hp=1234567890
self.df=99999999999999999999999999
self.attack=123456789012345678901246890
ikun=Hero()
print(ikun.hp)
\ 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