Commit 8cea79df by BellCodeEditor

save project

parent 9a73cc24
Showing with 8 additions and 5 deletions
......@@ -4,16 +4,18 @@ class hero:
self.name=name
self.hp=hp
self.attack=attack
def shenji(self):
self.lever+=1
self.hp+=50
self.attack+=5
yase=hero('yese',300,20)
hy=hero("hy",250,30)
print(yase.attack)
print(hy.attack)
def shenji():
yase.lever+=1
yase.hp+=50
yase.attack+=5
shenji()
yase.shenji()
shenji()
print(yase.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