Commit bc68f089 by BellCodeEditor

save project

parent e5dd2e99
Showing with 7 additions and 7 deletions
class Hero: class Hero:
def __init__(self) def __init__(self,name,hp ,attack)
self.level = 1 self.level = 1
self.hp= 300 self.level = name
self.attack= 20 self.hp= hp
self.attack= attack
yase=Hero("垭瑟",300,20)
houyi=("后羿",240,23)
k=Hero("凯",240,23)
yase=Hero()
print("yase的血量为:",yase.hp) print("yase的血量为:",yase.hp)
print("yase的攻击为:",yase.attack) print("yase的攻击为:",yase.attack)
\ 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