21 lines
620 B
Python
21 lines
620 B
Python
# 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())
|
|
|
|
|
|
|