Commit 31dc467e by BellCodeEditor

save project

parent 16980c2a
Showing with 14 additions and 0 deletions
cost={'苹果':5.2,'山竹':12.9,'香蕉':2.4,'荔枝':15,'葡萄':9.3,'桂圆':8,'蓝莓':10,'李子':8}
cost={'苹果':5.2,'山竹':12.9,'香蕉':2.4,'荔枝':15,'葡萄':9.3,'桂圆':8,'蓝莓':10,'李子':8}
M=input("请输入水果名称:")
J=input("请输入水果价钱:")
#M=名称 J=价钱
if M in cost:
if float(J)<=cost[M]:
print(M+'降价了,现价'+J+'元')
else:
print(M+'涨价了,不买')
else:
float[M]=cost(J)
print(K+"的价钱已上传。")
\ 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