American Young Coder

AYC logo
Loading Events

« All Events

  • This event has passed.

2 PM – Intro to Python

July 11, 2020 @ 2:00 pm - 3:00 pm

  • Today we went over the final projects.
  • We went over BabyNameGenerator.
  • Your homework is to add some more features to BabyNameGenerator:
    1. Finish implementing “get_random_name” function.  This should accept the user_input as the gender parameter and select a random boy’s name or a random girl’s name.  This name should be returned from the function. HINT: you need to use use an if statement to check if the user has selected boy or girl and the random.choice module.
    2. Create a for loop to repeatedly call “get_random_name” and print a random boy or girl name “number_name” times.  HINT: to use the “for” loop, you need to convert “number_name” to an integer and then pass it to the “range” function.

Details

Date:
July 11, 2020
Time:
2:00 pm - 3:00 pm