« All Events
6 PM – Intro To Python
October 3, 2020 @ 6:00 pm - 7:00 pm
- We continued with Baby Name Generator
- Homework:
- When user enter a number that is bigger than the number of names that we have, you should use for loop to go through all names inside the list and print all names. You should do this inside “get_names” function. Hint: len(names) will give the number of elements inside the list. Look at examples below where user ask for 10000 names but the program only gives 5 boys names because that all the names that the program has
Do you want boy or girl?
1. Boy
2. Girl
3. Quit
Enter your selection number: 1
How many names do you want? 10000
Mattew
mark
Luke
John
Alex
Do you want boy or girl?
1. Boy
2. Girl
3. Quit
Enter your selection number: