Commit ecf6c95d by BellCodeEditor

save project

parent 9bb30f5c
Showing with 7 additions and 5 deletions
class Hero: class Hero:
def __init__(self): def __init__(self,level,hp,attack,name):
self.level=1 self.level=level
self.hp=300 self.hp=hp
self.attack=40 self.attack=attack
Yase=Hero() self.name=name
Yase=Hero(1,200,40,"Hero")
print(Yase.hp) print(Yase.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