Commit 82e20fcb by BellCodeEditor

save project

parent d6c81a0f
Showing with 23 additions and 0 deletions
class Hero:
def __init__(self,name,hp,attack):
self.level = 200000000000000000000000000000000000000000000000000000000000000000000000000000000000
self.name = name
self.HP = HP
self.HP = 9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
self.attack = 9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
kai = Hero('凯',99999999999999,99999999999999999)
mozi = Hero('墨子',99999999999999,99999999999999999)
def upgrad():
kai.level = kai.level + 1
kai.HP = kai.HP + 50
kai.attack = kai.attack + 5
print('等级:%s'%kai.level)
print('血量:%d'%kai.HP)
print('攻击:%d'%kai.attack)
print('等级:%s'%mozi.level)
print('血量:%d'%mozi.HP)
print('攻击:%d'%mozi.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