Commit cf2b5e67 by BellCodeEditor

save project

parent bfc49016
Showing with 8 additions and 7 deletions
class Hero: class Hero:
def__init__(slef,name,hp,attack): def __init__(self,name,hp,attack):
slef.level=1 self.level=1
slef.name=name self.name=name
slef.hp=hp self.hp=hp
slef.attack=attack self.attack=attack
yali=Hero('鸭梨',300,20) yali=Hero('鸭梨',300,20)
\ No newline at end of file print('鸭梨',yali.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