Commit 7958bc4f by BellCodeEditor

save project

parent 8c3ef973
Showing with 9 additions and 4 deletions
class hero: class Hero:
def __init__(self): def __init__(self,name,hp,attack):
self.level=1 self.level=1
self.hp=30000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 self.name=name
self.attack=200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 self.hp=hp
self.attack=attack
yase = Hero("yase",300,20)
houyi = Hero("houyi",300,20)
print("yase的血量值为:",yase.hp)
print("houyi的攻击力为:",houyi.attack)
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