American Young Coder

AYC logo
Loading Events

« All Events

  • This event has passed.

5 PM – Intro to Java – Joel

June 1 @ 5:00 pm - 6:00 pm

Today we did:
  1. We worked on Magic8BallV2.

 

Homework:
  1. Make a new file called June1_RandomHomework
  2. Make a empty list called restaurants.
  3. Ask the user how many restaurants they want to add to the system.
  4. 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.
  5. Now make a while true loop, and inside, tell the user to
  6. type “Surprise me!” in order to get a random restaurant that they will go to today.
  7. Also in parentheses in the prompt, say “(enter ‘stop’ to quit)”
  8. Take the input and check if it is equal to “Surprise me!”. If it is not,
  9. then print “Looks you don’t want a surprise. Let me ask again…”
  10. If they did input “Surprise me!”, then
  11. Pick a random restaurant from the list, and then
  12. print something like “Surprise, you’ll be eating at <restaurant_name> today!”
  13. <restaurant_name> is the random restaurant that you picked.

Details

Date:
June 1
Time:
5:00 pm - 6:00 pm