Commit a5c62606 by BellCodeEditor

save project

parent 1e27a783
Showing with 6 additions and 8 deletions
class Hero:
def __init__(self):
def __init__(self,name,hp,attack):
self.level = 1
self.hp= 300
self.attack= 20 # attack:攻击
machao= Hero()
print("yase的血量值为:",machao.hp)
print("yase的攻击力为:",machao.attack)
\ No newline at end of file
self.name=name
self.hp=hp
self.attac=attack
yase=Hero("亚瑟","240","23")
print("yase的血量值为:",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