Commit ecf6c95d by BellCodeEditor

save project

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