Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Create the code for a Magic 8 Ball game in which the user enters a question such as What does my future hold? The computer
Create the code for a Magic 8 Ball game in which the user enters a question such as "What does my future hold?" The computer randomly selects one of eight possible vague answers, such as "It remains to be seen".
HINT: Create an array of 8 answers; The logic:
- Ask user to input a question
- Get a random number between 0 and 7
- Display the answer from the array for that random number
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started