Jan-21-2018, 04:39 PM
(This post was last modified: Jan-21-2018, 04:40 PM by captainflint.)
okey sorry ı did'nt know that.I have to create inventory and ı must use dictionary.When ı select 1 in the menü program must give me products list.such that;
inventory = {'asparagus': [10, 5], 'broccoli': [15, 6], 'carrots': [18, 7],
'apples': [20, 5], 'banana': [10, 8], 'berries': [30, 3],
'eggs': [50, 2], 'mixed fruit juice': [0, 8], 'fish sticks': [25, 12],
'ice cream': [32, 6],'apple juice': [40, 7], 'orange juice': [30, 8],'grape juice': [10, 9]]}
How ı do it ?
inventory = {'asparagus': [10, 5], 'broccoli': [15, 6], 'carrots': [18, 7],
'apples': [20, 5], 'banana': [10, 8], 'berries': [30, 3],
'eggs': [50, 2], 'mixed fruit juice': [0, 8], 'fish sticks': [25, 12],
'ice cream': [32, 6],'apple juice': [40, 7], 'orange juice': [30, 8],'grape juice': [10, 9]]}
How ı do it ?
menu=True while menu: print(""" 1.Search for a product. 2.See Basket 3.Check Out 4.Logout 5.Exit """) answer = raw_input("Your choice: ") message2 = "Please choose one of the following Services:" print message2 if menu=="1": inventory = {'asparagus': [10, 5], 'broccoli': [15, 6], 'carrots': [18, 7], 'apples': [20, 5], 'banana': [10, 8], 'berries': [30, 3], 'eggs': [50, 2], 'mixed fruit juice': [0, 8], 'fish sticks': [25, 12], 'ice cream': [32, 6],'apple juice': [40, 7], 'orange juice': [30, 8],'grape juice': [10, 9]]}