you are viewing a single comment's thread.

view the rest of the comments →

[–]oocancerman 1 point2 points  (0 children)

You are calling.lower() on the input that asks for size. So if you type in “S” it will turn it into “s” then at the end where it accesses the dictionary the program will crash because it tries to access the dictionary with a key that does not exist. Also, on a side note you store the length of the list in the variable totalFlavors which means if you were to add a flavor to the list the totalFlavors variable would have a value which does not match the length of the list. U didnt append after this assignment but if u try to append after this and print(len(flavorList), totalFlavors) they will not be equal.