Commit b05fd246 by BellCodeEditor

auto save

parent 98f24605
Showing with 45 additions and 11 deletions
# 这是悟空为花果山小猴做臂力测试的程序代码 # 这是悟空为花果山小猴做臂力测试的程序代码
name=input('你叫啥名啊?') #name=input('你叫啥名啊?')
power=int(input('你臂力多少啊?')) #power=int(input('你臂力多少啊?'))
list_hero=['猴三',10,'猴一',21,'猴五',22,'猴队长',29,'猴七',30] #list_hero=['猴三',10,'猴一',21,'猴五',22,'猴队长',29,'猴七',30]
for i in range(len(list_hero)): #for i in range(len(list_hero)):
if i%2==1 and list_hero[i]>=power: #if i%2==1 and list_hero[i]>=power:
list_hero.insert(i-1,name) #list_hero.insert(i-1,name)
list_hero.insert(i,power) #list_hero.insert(i,power)
break #break
print(list_hero) #print(list_hero)
# 请注释掉上面的代码,并在下一行创建一个名为dict_hero的字典 # 请注释掉上面的代码,并在下一行创建一个名为dict_hero的字典
dict_hero= #dict_hero={"猴3":10,"猴1":21,"猴5":22,"猴队长":29,"猴7":30}
print(dict_hero) #print(dict_hero)
#print(dict_hero["猴队长"])
#dict_hero["猴队长"]=40
#print(dict_hero)
#dict_hero["猴10"]=25
#print(dict_hero)
#if "猴10" in dict_hero:
#print(dict_hero["猴10"])
#dict={"可乐":99999999,"辣条":0.55565475,"鸡肉":345674564365467,"六岁山":0.4544357574587,"劳斯莱斯":0.1,"兰博基尼":0.5,"法拉利":0.2}
#k=input("你要啥")
#i=100000
#if k in dict:
#print("有100000元购物税")
#print("你要"+k+"要"+str(i)+"元税和"+str(dict[k])+"元,共"+str(i+dict[k])+"元")
#else:
#print("没有,滚")
cost={"苹果":120909,"荔枝":10987654321,"车厘子":124857,"榴莲":2345678,"沙糖桔":6523,"水蜜桃":123456789123456781234567}
k=input("你要啥")
v=input("多少钱")
if k in cost:
if float(v)<cost[k]:
cost[k]=float(v)
print(k+"降了,现在"+v+"")
else:
print(k+"涨了,不要")
else:
cost[k] = float(v)
print(k+"的钱"+v+"元已上传")
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