Lab 3.01 - Magic 8-Ball
Practice importing random** — Use randint with different arguments. Simulate a dice roll, printing out to the user what number they rolled.
Look at the documentation of the random library — Experiment with another function (not randint) that returns a value.
Create a program that simulates a magic 8-ball
- Store all of the 8-ball’s possible responses (shown below) in a list
- Have the program prompt the user to ask the magic 8-ball a question
- then return and print a random response.
Magic 8-Ball Response Examples
- Outlook is good
- Ask again later
- Yes
- No
- Most likely no
- Most likely yes
- Maybe
- Outlook is not good
Video Explanation
Bonus
Research the math library and create a program that finds the length of the hypotenuse of a right triangle given two sides.
