Commit fc4d3636 by BellCodeEditor

save project

parent 110d1760
Showing with 7 additions and 5 deletions
class Hero: class Hero:
def__init__(self): def __init__(self,name,hp,attack):
self.level=1000000000 self.level=1000000000
self.hp=54188 self.hp=54188
self.attack=58814 self.attack=attack
yase=Hero() yase=Hero("鸡你太美",9000000000,900000000)
print(yase.hp) houyi=Hero("小黑子",250,250)
\ No newline at end of file print("鸡你太美的血量为:",yase.hp)
print("小黑子的血量为:",houyi.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