diff --git a/Chapter_08/8-12_sandwiches.py b/Chapter_08/8-12_sandwiches.py new file mode 100644 index 0000000..0d616cd --- /dev/null +++ b/Chapter_08/8-12_sandwiches.py @@ -0,0 +1,20 @@ +# Exercise 8-12 Sandwiches +# Learning Objective: Create a function that accepts arbitrary number of arguments. + +order = [] + +ordering = True +print("Enter each ingredient one by one and hit enter. WHEN DONE type DONE to stop and process your order.") +while ordering == True: + sandwich_item = input("What can I add to your sandwich: \n") + if sandwich_item.lower() == 'done': + ordering = False + print("\tAdding {sandwich_item} to your sandwich...\n") + order.append(sandwich_item) + +print(f"ORDER COMPLETE\nYou've ordered the following:\t") +for ingredient in order: + print(ingredient.lower()) + + +