Commit 462564e5 by BellCodeEditor

save project

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