Commit 5d80850b by BellCodeEditor

save project

parent ab103746
Showing with 12 additions and 3 deletions
class Hero: class Hero():
def __init__(self,name,hp,attack):
\ No newline at end of file self.level = 1
self.hp = 300
self.attack = 20
self.baoji = 10
ya_suo = Hero("疾风剑豪",300,20)
a_li = Hero("半神之弓",250,23)
print(ya_suo.hp)
print(a_li.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