Commit 3a9fff46 by BellCodeEditor

save project

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