Commit df1d7d13 by BellCodeEditor

save project

parent bda735ec
Showing with 9 additions and 9 deletions
dict={'可口可乐':3,'旺仔牛奶':4,'农夫山泉'1}
dict={'张三':30,'李四':37,'王五':52} j=input('你要买什么?')
dict['李四']=80 num=int(input('请问您要购买几个'))
dict['赵六']=99 if j in dict:
print('您要的商品'+j+'价格为',dict[j],'元')
if '赵六' in dict: print('您一共消费',dict[j]*num,'元')
print(dict['赵六']) else
print(dict) print('您要的商品'+j+'暂时缺货')
\ 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