Here's the problem.
You want to pretend that you're a waitress at a diner.
That's what the function is going to be.
You're going to be a waitress in a diner taking an order.
So you'll come up to the table and say,
"Hello, I'll be your waitress. What will you have?"
Then as a customer,
you'll say something like eggs,
and she'll put that into the list.
Bacon, she'll write that on her list.
Toast, she'll write that on her list.
And jelly, she'll write that on her list.
You can order anything you want to she would just put it on the list.
Then when you say, "that's all",
she'll stop taking the order and print out the list of items that you ordered.
That's the function that I want you to write and it involves creating a list,
looping through and adding
things to the list that will be numbered this time it will be foods.
And then, indicating when you want the loop to end by entering that's all,
and then printing out the list.
Here's my run on that program just so you can see how it works.
Diner waitress.
That's what will happen when you run the program.
Hello, I'll be your waitress.
What will you have? It'll ask that question.
Then it will loop through an answer menu item and you'll type in eggs,
then it'll loop through,
ask for another menu item,
and you say bacon.
Then it'll ask for another menu item and you give another one.
And then it'll ask for another one and then you give them another one.
And then, if you ever enter, that's all,
that particular string, then it will quit taking
the order and print out the list of things that you've ordered.
Now, you try to write this function,
write diner waitress, and when you get done,
press continue and I'll show you my solution.
Here's my solution.
Let me run it once for you.
I'll show you how it does work. Okay, I'll type bacon,
eggs, toast, that's all.
And it'll print out what I ordered.