n=list(input().split())
data={'1':'apple',
'2':'pear',
'3':'orange',
'4':'grape',
'0':'exit',
}
for key,value in data.items():
print('[{}] {}'.format(key,value))
dic = {'1':'3.00','2':'2.50','3':'4.10','4':'10.20'}
cnt=0
for i in n:
if i == '0' or cnt==5:
break
elif i not in data.keys():
print('price = 0.00')
else:
print('price = {}'.format(dic.get(i)))
cnt +=1
第四章 7-9 查询水果价格
最新推荐文章于 2023-08-18 12:44:36 发布