Commit 1fa1c884 by BellCodeEditor

save project

parent e39cc9b3
Showing with 7 additions and 9 deletions
class xinxiong:
def __init__(self):
def __init__(self,name,hp,attack):
self.level=1
self.hp=1000
self.hp=hp
self.attack=10
self.jinyan=0
libai = hero()
print(libai.level)
print(libai.hp)
print(libai.attack)
print(libai.jinyan)
\ No newline at end of file
self.name=name
gongben = xinxiong("宫本"1000,20)
libai = xinxiong("李白",700,20)
print("宫血:",gongben,hp)
print("李血:",libaihp)
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