Commit 3a9fff46 by BellCodeEditor

save project

parent 12431d4c
Showing with 9 additions and 10 deletions
......@@ -4,12 +4,11 @@ class daye:
self.name=name
self.hp=hp
self.attack=attack
def shengji():
nakelulu.level+=1
nakelulu.hp+=5
nakelulu.attack+=10
nakelulu=daye(1,"娜可露露",784,243)
shengji()
shengji()
print(nakelulu.name,nakelulu.level,nakelulu.hp,nakelulu.attack)
\ No newline at end of file
def shengji(self):
self.level+=1
self.hp+=5
self.attack+=10
wzry=daye(1,"赵云",784,243)
wzry.shengji()
wzry.shengji()
print(wzry.name,wzry.level,wzry.hp,wzry.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