Commit 462564e5 by BellCodeEditor

save project

parent 20bbcc3a
Showing with 10 additions and 8 deletions
#认真听课,不要动鼠标哦 #认真听课,不要动鼠标哦
class Heros: class Heros:
def __init__(m): def __init__(m , name , attack , hp ):
m.hp = 1 m.name =name
m.level = 0.1 m.hp = hp
m.attack = 5 m.level = 1
m.attack = attack
wuyifang = Heros() wuyifang = Heros("吴谦",0.5,5000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000)
print("吴谦der命根子有"+str(wuyifang.hp)+"根") cxk = Heros("坤坤",10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,1)
\ No newline at end of file print(wuyifang.name+"hp"+str(wuyifang.hp))
print(cxk.name+"hp"+str(wuyifang.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