- This event has passed.
6PM – Intro to Python – Joshua Widjanarko
October 17 @ 6:00 pm - 7:00 pm
Today We Did:
- Review hw 2
- Study Guide
- what is an integer, a string, and a float
- how to do for and while loops
- how to use input() and int()
- Infinite loops with a break
- if,elif,else
- error fix
Homework:
- Study for the test. I put a practice problem if you want, but email me if you have any questions. Look over old homework and fix bugs if you haven’t already
Recommended Studying (quiz_2_additional Practice.py)
Question 1
Goal: Write the function gather_names_2 with the int variable max_names. gather_names will ask people for their name, and then add that names onto a list until someone types in “quit” or the list has a number of people equal the max_names. You will return that list of names
You will then call gather_names, and then randomely chose a single name in that list.
print the phrase “<Randomly Chosen Name>, you have won a prize”
The Following topics question also might be useful to brush up on
- Getting a random number or a random object from a list
- how to write for loops/while loops to navigate lists
- how to access, append, remove things from lists
- how to find out how long lists are
- how to ask for input
NOTES:
If you have any questions feel free to email me jwidjanarko@ayclogic.com