Commit 67896653 by BellCodeEditor

save project

parent 1ed4da07
Showing with 5 additions and 3 deletions
......@@ -4,16 +4,18 @@ class Hero:
self.name = name
self.hp = hp
self.attack = attack
def shengji(name):
def shengji(self):
self.level = self.level + 1
self.hp = self.hp + 9999999999999999999999999999999999999
self.attack = self.attack + 11111111111111111111111111
yase = Hero(1,"亚瑟",9999999999999999999,11111111)
print("亚瑟血量",yase.hp)
gouge =Hero(1,"狗哥",100000000000,88888888888888)
print("狗哥血量",gouge.hp)
yase.shengji()
gouge.shengji()
print(yase.name+str(yase.hp))
print(gou.name+str(yase.hp))
\ No newline at end of file
print(gouge.name+str(yase.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