- This event has passed.
6pm- Intro to Python- Joshua Widjanarko
October 10 @ 6:00 pm - 7:00 pm
Today We Did:
- Reviewed Fix 2 Homework
- Remember that it is <= or >= not => =<
- If/Elif/else reminder: remember the idea of boxes
- If is start , elif in the middle(if needed), else in the end( if needed)
- int(“4”) is needed if you are using numbers for comparison.
- Test your code with all kinds of numbers. You might find Bug/Error if you type a specific value in
- Remember three steps
- Find the location (Click on the blue line
- Look at the bottom of the error function
- Remember to do your homework quiz 2 practice (Bug free)
Homework:
In another new file, “quiz_2_practice”, do the following:
- https://www.ayclogic.com/intro-to-python-exercises-for-quiz-2/
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