drink={'绿茶':2,'冰糖雪梨':2,'尖叫':4,'阿萨姆':4.5,}
Cart=[]
def Go_shooping():
for key, values in drink.items():
print(key, values)
def main():
count = 0
while True:
input_in=input("请输入您要购买的东西,输入end退出购买")
if input_in == 'end':
print("消费总金额为{}".format(count))
break
for key,values in drink.items():
if key == input_in:
count_num=int(input("请输入您的购买数量"))
Cart.append(input_in*count_num)
count+=values*count_num
print("您的购物车里现在有",Cart)
print("目前消费金额为{}".format(count))
if __name__ == '__main__':
Go_shooping()
main()