Commit 61b9b721 by BellCodeEditor

save project

parent d540c73f
Showing with 8 additions and 7 deletions
class Hero: class Hero:
def __init__(self): def __init__(self,lv,name,hp,st):
self.lv=15 self.lv=lv
self.hp=250 self.hp=hp
self.st=999 self.st=st
sb=Hero() self.name=name
print(sb.hp) sb=Hero(15,"卢本伟",99999,999)
\ No newline at end of file print(sb.lv)
print(sb.name)
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