Commit 71a09cf5 by BellCodeEditor

save project

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