Commit 3d2e4232 by BellCodeEditor

save project

parent 41992a6f
class Hero:
def __init__(self):
self.level=15
self.hp=1000
self.attack=10000
kai=Hero()
print(kai.level)
print(kai.hp)
print(kai.attack)
\ No newline at end of file
class Hero():
def __init__(self,name,hp,attack):
self.level=1
self.name=name
self.hp=hp
self.attack=attack
bailishouyue=Hero("百里守约",500000,900000000)
print(bailishouyue.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