Commit 5d841b25 by BellCodeEditor

save project

parent cda2e127
Showing with 11 additions and 7 deletions
class Hero():
der_init_(self):
self.name="亚瑟"
self.hp=999999999999999999999999999
self.acttack=9999999999999999999999999999999
yese=Hero()
print(yese.hp)
\ No newline at end of file
def __init__(self,name,hp,attack):
self.level=1
self.name=name
self.hp=hp
self.acttack=acttack
yese=Hero("yase",300,20)
hy=Hero("hy",250,23)
k=Hero("K",5600,199)
print(yese.acttack)
print(hy.acttack)
print(k.acttack)
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