- This event has passed.
5 PM – Intro to Java – Joel
June 1 @ 5:00 pm - 6:00 pm
Today we did:
- We worked on Magic8BallV2.
Homework:
- Make a new file called June1_RandomHomework
- Make a empty list called restaurants.
- Ask the user how many restaurants they want to add to the system.
- With that amount, loop using a for loop that amount of times, asking for a restaurant name each time and adding it to the list.
- Now make a while true loop, and inside, tell the user to
- type “Surprise me!” in order to get a random restaurant that they will go to today.
- Also in parentheses in the prompt, say “(enter ‘stop’ to quit)”
- Take the input and check if it is equal to “Surprise me!”. If it is not,
- then print “Looks you don’t want a surprise. Let me ask again…”
- If they did input “Surprise me!”, then
- Pick a random restaurant from the list, and then
- print something like “Surprise, you’ll be eating at <restaurant_name> today!”
- <restaurant_name> is the random restaurant that you picked.