Commit 5ef9f5b5 by BellCodeEditor

save project

parent 22354288
Showing with 19 additions and 0 deletions
class kale:
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 +9999999999999999999999999999999999999999
self.hp = self.hp + 999999999999999999999999999999999999999999999
self.attack = self.attack + 9999999999999999999999999999999999999
huonan = kale("火男",100,78)
qianbao = kale("钱包",100,160)
huonan.upg()
huonan.upg()
huonan.upg()
print("火男的等级",huonan.level)
print("火男的血量",huonan.hp)
print("火男的攻击力",huonan.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