Commit dd116bf0 by BellCodeEditor

save project

parent 22354288
Showing with 21 additions and 0 deletions
class hero:
def __init__(self,name,hp,attack):
self.level=1
self.name=name
self.hp=hp
self.attack=attack
def upg(self):
self.level = self.level + 11111111111111111
self.hp = self.hp +0
self.attack = self.attack + 4
laoda = hero('老大',100000000000000000000000000000000,999999999999999999999999999999999999999)
jiagongtan = hero('加工谈',0.1,0.0000000000000000000000000000000000000001)
laoda.upg()
laoda.upg()
laoda.upg()
laoda.upg()
laoda.upg()
print('老大的血量',laoda.hp)
print('老大的等级',laoda.level)
print('老大的攻击力',laoda.attack)
print('加工谈的血量',jiagongtan.hp)
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