Commit 8bcfc467 by BellCodeEditor

save project

parent 7141474a
Showing with 9 additions and 8 deletions
class hero:
def __init__(self):
self.leve1=6
self.hp=600
self.attack=50
self.height=170
def __init__(self,hp,attack,height):
self.leve1=1
self.hp=hp
self.attack=attack
self.height=height
pipi=hero()
print(pipi.height)
\ No newline at end of file
pipi=hero("pipi",150,600)
dudu=hero("dudu",160,400)
print(dudu.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