Commit 05042ab4 by BellCodeEditor

save project

parent 73a45ec1
Showing with 11 additions and 8 deletions
......@@ -3,12 +3,15 @@ class Hero:
self.level=9
self.hp=400
self.ap=40
def one(self):
self.level=self.level+3
self.hp=self.hp+40
self.ap=self.ap+9
yase=Hero()
yase.one()
print(yase.hp)
class Hero2:
def __init__(self2):
self2.level=8
self2.hp=350
self2.ap=35
hoyi=Hero2()
print(hoyi.hp)
\ No newline at end of file
houyi=Hero()
houyi.one()
print(houyi.hp)
\ 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