Commit 294d5b46 by BellCodeEditor

save project

parent 4657e1ac
Showing with 7 additions and 7 deletions
class Hero: class Hero:
def __init__(self): def __init__(self,level,hp,attact):
self.level=1 self.level=level
self.hp=300 self.hp=hp
self.attact=20 self.attact=attact
yase=Hero()
print(yase.level,yase.hp,yase.attact) lizhuocheng=Hero(1,300,10)
\ No newline at end of file print(lizhuocheng.level,lizhuocheng.hp,lizhuocheng.attact)
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