Commit 71a09cf5 by BellCodeEditor

save project

parent 6aeb8a89
Showing with 8 additions and 4 deletions
class hero:
def __init__(self):
def __init__(self,name,hp,attack):
self.level=150
self.hp=45000
self.attack=3000
PaiMeng=hero()
print(PaiMeng.level)
\ No newline at end of file
PaiMeng=hero("PaiMeng",31,20)
Kong=hero("Kong",30,23)
Ying=hero("Ying",34,22)
print(PaiMeng.attack)
print(Kong.attack)
print(Ying.attack)
\ 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