Commit eadc391e by BellCodeEditor

save project

parent c42506dd
Showing with 10 additions and 7 deletions
# 神奇百货中的物品已经帮你创建好啦,接下来要看你的了~ dict={"香蕉":5,"橘子":4,"苹果":4.78,"榴莲":7.8}
dict= {'可口可乐':3,'旺仔牛奶':4,'农夫山泉':1,'辣条':3,'巴西烤肉':2,'果冻':4,'乐事':5,'奥利奥':10,'巧克力':6} a=input("今天要买什么")
a=input("你想买什么") if not a in dict:
if a in dict: b=input("它昨天多少钱")
print("你要付",dict[str(a)],"元") dict[a]=float(b)
c=input("它今天多少钱")
if dict[a]>float(c):
print("降价了")
else: else:
print("这里不卖这个") print("涨价了")
\ No newline at end of file \ 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