Commit 077f6233 by BellCodeEditor

save project

parent fe12037a
Showing with 4 additions and 21 deletions
# 神奇百货中的物品已经帮你创建好啦,接下来要看你的了~
#dict= {'可口可乐':3,'旺仔牛奶':4,'农夫山泉':1,'辣条':3,'巴西烤肉':2,'果冻':4,'乐事':5,'奥利奥':10,'巧克力':6}
#k = input("请问您想购买什么商品")
#if k in dict:
##else:
# print("很抱歉,该商品尚未上架或无货!")
cost = {"苹果":5,2,"山竹":12,9,"香蕉":2.4,"荔枝":15,"葡萄":9.3,"桂圆":8,"蓝莓":10}
k = input("请输入水果名称:")
v = input("请输入水果价钱:")
if k in cost:
if float(v) < cost[k]
cost[k] = float(v)
print(k + "降价了,现价是"+v+"元")
elif float(v) == cost[k]
print("")
else:
print(k + "")
else:
print(k + "")
print(k + "" + v + "")
score = {'语文':91'数学':88'英语'95}
for k ,v in score.items():
print(k ,v)
\ 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