Commit ca70a836 by BellCodeEditor

save project

parent c1c3b2ef
Showing with 12 additions and 7 deletions
class daye: class daye:
def __init__(self,name,hp,attack,): def __init__(self,level,name,hp,attack,):
self.level=level
self.name=name self.name=name
self.hp=hp self.hp=hp
self.attack=attack self.attack=attack
nakelulu=daye("娜可露露",784,243) def shengji():
hanxin=daye("韩信",664,214) nakelulu.level+=1
libai=daye("李白",671,184) nakelulu.hp+=5
print(nakelulu.name,nakelulu.hp,nakelulu.attack) nakelulu.attack+=10
print(hanxin.name,hanxin.hp,hanxin.attack)
print(libai.name,libai.hp,libai.attack) nakelulu=daye(1,"娜可露露",784,243)
shengji()
shengji()
print(nakelulu.name,nakelulu.hp,nakelulu.attack)
\ 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