Commit 35bff76c by BellCodeEditor

save project

parent 63d38fb6
Showing with 9 additions and 7 deletions
class Here: class Here:
def __init__(self): def __init__(self,name,hp,attack):
self.level=1 self.level=1
self.hp=300 self.name=name
self.attack=20 self.hp=hp
year=Here() self.attack=attack
print("year的血量为:",year.hp) year=Here("亚索",300,20)
print("year的攻击为:",year.attack) huwwi=Here("后羿",240,23)
\ No newline at end of file print("后羿的血量为:",year.hp)
print("亚索的攻击为:",huwwi.hp)
\ 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