Commit 08038cd0 by BellCodeEditor

save project

parent 22354288
Showing with 22 additions and 0 deletions
class Hero:
def __init__(self,name,hp,attack):
self.level=1
self.name=name
self.attack=attack
self.hp=hp
dema=Hero("德玛",1234,35)
baozoluoi=Hero("暴走萝莉"a,123,67)
# print("暴走萝莉血条:",bozoluoi.hp)
def qwer():
dema.level= dema.level+1
baozoluoi.level=baozoluoi.level+1
dema.hp= dema.hp+50
baozoluoi.hp=baozoluoi.hp+1
dema.attack=+dema.attack+23
baozoluoi.attack=baozoluoi.attack+23
qwer()
print(dema.hp)
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