Commit e2b9f066 by BellCodeEditor

save project

parent 8d915629
Showing with 9 additions and 6 deletions
class Hero:
def __init__(self):
self.hp=1000
self.attack=10000
def __init__(self,name,hp,attack):
self.name=name
self.hp=hp
self.attack=attack
self.level=1
aoteman=Hero()
print(aoteman.hp)
\ No newline at end of file
aoteman=Hero('aoteman',100,10000)
dijia=Hero('dijia',99,1000000000000)
print("奥特曼的血量为",aoteman.hp)
print("迪迦的血量为",dijia.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