**TEALS Program** Home | Curriculum Map | Additional Readings | Discussions | Change Log # 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 in the `random` library (not `randint`) that returns a value. ## Create a program that simulates a [Magic 8-Ball] 1. Store all of the 8-Ball's possible responses (shown below) in a list 2. Have the program prompt the user to ask the Magic 8-Ball a question 3. 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 [](https://www.youtube.com/watch?v=vZRrg6Nl-1E) ## Bonus Research the `math` library in Python. Create a program that finds the length of the hypotenuse of a right triangle, given the two perpendicular sides. Can this program be completed without using `import math`? [documentation]: https://docs.python.org/3/library/random.html [Magic 8-Ball]: https://en.wikipedia.org/wiki/Magic_8-Ball