Commit be7ff570 by BellCodeEditor

save project

parent 779a906e
Showing with 10 additions and 6 deletions
class Hero: class Hero:
def __init__(self): def __init__(self,name,hp,attack):
self.hp=300 self.hp=hp
self.attack=60 self.attack=attack
ys=Hero() self.name=name
print(ys.attack)
\ No newline at end of file ys=Hero('ys',300,25)
hy=Hero('hy',250,30)
print(ys.name)
print(hy.name)
\ 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