Commit 021b0efd by BellCodeEditor

save project

parent c9b60bda
Showing with 12 additions and 4 deletions
class Hero
def__init__(self):
\ No newline at end of file
class Hero:
def __init__(self,name,hp,attack):
self.level=78
self.name=name
self.attack=attack
self.hp=hp
xiao = Hero("魈",21578,1991)
leidianjiangjun= Hero("雷电将军",18945,2093)
print(xiao.hp)
print(leidianjiangjun.hp)
print(xiao.attack)
print(leidianjiangjun.attack)
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