Completed 8-12 Sandwiches

This commit is contained in:
cheeks 2025-02-20 01:31:59 +00:00
parent 30c400a26c
commit a3aa5c7bf8

View File

@ -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())