Commit 988f1eae by BellCodeEditor

save project

parent 4794d14f
Showing with 8 additions and 4 deletions
class Hero: class Hero:
def __init__(self): def __init__(self,name,hp,attack):
self.level=1 self.level=1
self.hp=300 self.hp=300
self.attast=20 self.attast=20
yase=Hero() bailishoyue=Hero("百里守约",50,9999)
print(yase.hp) yase=Hero("亚瑟",50,999)
\ No newline at end of file liushan=Hero("刘禅",50,999)
print(bailishoyue.hp)
print(yase.hp)
print(liushan.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