- This event has passed.
6 PM – Intro To Python – Darin
September 21, 2023 @ 6:00 pm - 7:00 pm
What We Did Today:
- Reviewed the homework on formatting of a function
- Learnt how to generate random numbers and choose a random item from a list
- Created Magic 8 Ball text based mini-game
Homework:
Create a new file called Magic8Ball_HW.py and submit to google drive when you finish.
- Recreate the Magic8Ball game but this time using random.choice() instead of random.randint()
- To use the random.choice() function, you have to give it a list as a parameter, so like random.choice(lst)
- Put the questions inside of the list and print out random.choice(lst)
Notes:
If you have any questions, feel free to email me at ddjapri@ayclogic.com