Commit 294eb441 by BellCodeEditor

save project

parent adc52e7f
Showing with 10 additions and 8 deletions
class Hero:
def __init__(self):
self.level = 1
self.hp= 300
self.attack= 20
yase=Hero()
def __init__(self,hp,attack,speed):
self.hp = hp
self.attack = attack
self.speed = speed
yase=Hero(300,20,1.5)
sangqi=Hero(200,20,2)
kai=Hero(250,100,1.8)
print("亚瑟的血量为",yase.hp)
print("亚瑟的等级为",yase.level)
print("亚瑟的攻击力为",yase.attack)
\ No newline at end of file
print("凯的攻击力为",kai.attack)
print("桑启")
\ 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