Commit df1d7d13 by BellCodeEditor

save project

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