-1
I’m having difficulty doing an exercise of the book 'Eric Matthes' intensive python course the exercises is as follows:
7.8 - Snack bar: Create a list called sandwich_orders and fill it with the names of several sandwiches. Then create an empty list named finished_sandwiches. Browse the list of sandwich orders with a bow and show a message for each request, for example, I have prepared your tuna sandwich. As each sandwich is prepared, transfer it to the list of ready-made sandwiches. After all the sandwiches are ready, show a message listing each prepared sandwich.
sandwich_orders = ['frango', 'peru', 'queijo', 'presunto']
finished_sandwiches = []
while finished_sandwiches:
sandwiches = sandwich_orders.pop()
finished_sandwiches.append(sandwiches)
for sandwich in finished_sandwiches:
print('Preparei seu sanduiche de ' + sandwich)
When I run the file in vscode it answers me this:
PS C:\Users\Pedro Moraes\Desktop\stuff\Exercicios\python> & "C:/Users/Pedro Moraes/AppData/Local/Programs/Python/Python38-32/python.exe" "c:/Users/Pedro Moraes/Desktop/stuff/Exercicios/python/lanchonete.py"
It does not "printa" anything in the terminal.
What I must do?
The program is acting as expected.
finished_sandwiches
is empty, so thewhile finished_sandwiches
has nothing to do.– Bacco