Commit 7fd64144 by BellCodeEditor

save project

parent 5b66a6d6
Showing with 10 additions and 7 deletions
class hero: class hero:
def __init__(self): def __init__(self,name,hp,attack):
self.level=1 self.lever=1
self.hp=300 self.name=name
self.attack=50 self.hp=hp
yuanfang=hero() self.attack=attack
print(yuanfang.hp) yase=hero('yese',300,20)
\ No newline at end of file hy=hero("hy",250,30)
print(yase.attack)
print(hy.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