Completed Exercise 7-8 Deli

This commit is contained in:
cheeks 2025-02-06 08:07:37 -05:00
parent bd7baf4b04
commit 10493c58d4

14
Chapter_07/7-08_deli.py Normal file
View File

@ -0,0 +1,14 @@
# Exercise 7-8 Deli
# Learning Objective: USe a loop to edit a list. Print list.
sandwich_orders = ['Ham and Swiss', 'Bologna and Cheese', 'Italian Combo', 'Chicken Parm']
finished_sandwiches = []
while sandwich_orders:
sandwich = sandwich_orders.pop()
print(f"I made your {sandwich}")
finished_sandwiches.append(sandwich)
print(f"\nSandwiches made: ")
for sandwiches in finished_sandwiches:
print(f"{sandwiches}")