size = ['small', 'medium', 'large']
cook = ['well done', 'rare', 'medium']
protein = ['meat', 'chickpea','salmon', 'egg']
topping = ['tomato', 'onion', 'lettuce', 'cheese', 'pickle']
useroptions = []
def sizeandmethod ():
chosensize = str(input('what size would u like'))
if chosensize.lower () in size:
useroptions.append (chosensize)
else:
print('invalid input')
chosenmethod = str(intput('how would u like it to be cooked'))
if chosenmethod.lower() in cookingmethod:
useroptions.append(chosenmethod)
else:
print('invalid output')
toppingcount = [0,0,0,0,0] #empty array resetting every time for toppings
def calctopping():
print(topping)
for count in range (0,3):
toppingchoice = str(input('enter toppings that u want '))
if toppingchoice.lower() in topping:
position = topping.index(toppingchoice)
toppingcount[position] = toppingcount[position] + 1
useroptions.append (toppingchoice)
else:
print('invalid input')
proteincount = [0,0,0,0,0]
def calcprotein():
print(protein)
proteinchoice = str(input('enter protein that u want '))
if proteinchoice.lower() in protein:
position = protein.index(proteinchoice)
proteincount[position] = proteincount[position] + 1
useroptions.append (proteinchoice)
else:
print('invalid input')
def displaytopstats ():
leastpop = toppingcount.index (min(topping count)) #find position of the lowesttopping count
mostpop = toppingcount.index (max(toppingcount))
print('least popular choice for the day is ',topping[leastpop], 'it was chosen ', toppingcount[leastpop],'times') Click Run or press shift + ENTER to run code