Commit 04ee5f8e by BellCodeEditor

save project

parent b2c6abc0
Showing with 7 additions and 6 deletions
class hero: class hero:
def __init__(self): def __init__(self,name,hp,attack):
self.hp=300 self.name=name
self.level=1 self.hp=hp
self.attack=20 self.attack=attack
yase=hero() yase=hero('亚瑟',300,20)
print('血量',yase.hp) yase=hero('后羿',250,99999)
print("血量",yase.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