Commit 61b9b721 by BellCodeEditor

save project

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