Commit adfde101 by BellCodeEditor

save project

parent 8f255575
Showing with 17 additions and 3 deletions
cost={'苹果':8}
cost={'苹果':8}
k=input('请输入水果名称')
v=input('请输入水果价钱')
if k in cost:
if float(v)<
dict= {'可口可乐':3,'旺仔牛奶':4,'农夫山泉':1,'辣条':3,'巴西烤肉':2,'果冻':4,'乐事':3} dict= {'苹果':3,'山竹':4,'香蕉':1,'荔枝':3,'葡萄':2,'桂圆':4,'蓝莓':3}
dict= {'可口可乐':3,'旺仔牛奶':4,'农夫山泉':1,'辣条':3,'巴西烤肉':2,'果冻':4,'乐事':3} dict= {'苹果':3,'山竹':4,'香蕉':1,'荔枝':3,'葡萄':2,'桂圆':4,'蓝莓':3}
j=input("你要购买什么") j=input("你要购买的水果名称")
v=input("价钱是")
if j in dict: if j in dict:
print("你要买的"+j+"需要支付"+str(dict[j])+"元") print("你要买的"+j+"需要支付"+str(dict[j])+"元")
else: else:
......
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