Commit 23c09b4a by BellCodeEditor

save project

parent adffa849
Showing with 13 additions and 7 deletions
class Hero: class Hero:
def __init__(self): def __init__(self,name,hp,gj):
self.hp=200 self.hp=hp
self.gj=20 self.gj=gj
self.level=300 self.level=15
yase=Hero() self.name=name
print(yase.hp)
\ No newline at end of file def sj():
lixin.hp+=20
lixin.level+=1
lixin.gj+=20
lixin=Hero("李信",366,89)
print(lixin.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