原题题目
代码实现
print("[1] apple\n[2] pear\n[3] orange\n[4] grape\n[0] exit")
nums = list(input().split());prices = [3.00,2.50,4.10,10.20];strl,count = min(len(nums),5),0
while count<strl and nums[count] != '0':
if 1<=int(nums[count]) <= 4:print("price = %.2f" % prices[int(nums[count])-1])
else:print("price = %.2f" % 0)
count+=1