Computers and Technology, 30.05.2020 00:06 nockturnal1993
Have you ever seen a Magic 8 ball? You ask it a yes-no question and then shake it to get a random response like “Signs point to yes!”, “Very doubtful”, etc. If you’ve never seen a Magic 8 ball, check out this video.
We encourage you to work in pairs for this challenge. Come up with 8 responses to yes-no questions. Write a program below that chooses a random number from 1 to 8 and then uses if statements to test the number and print out the associated random response from 1-8. If you need help with random numbers, see lesson 2.9.
public class Magic8Ball
{
public static void main(String[] args)
{
// Get a random number from 1 to 8
// Use if statements to print out 1 of 8 responses
}
}
1
public class Magic8Ball
2
{
3
public static void main(String[] args)
4
{
5
// Get a random number from 1 to 8
6
7
// Use if statements to print out 1 of 8 responses
8
9
10
}
11
}
Answers: 2
Computers and Technology, 22.06.2019 22:00
During physical science class ben and jerry connected three identical lightbulbs in parallel to a battery where happens when ben removes one of the lightbulbs from it’s socket
Answers: 2
Computers and Technology, 23.06.2019 14:30
Select the correct answer. what does it indicate when a website displays https instead of http? a. the website is secure. b. there is no secure sockets layer. c. the secure sockets layer is hidden. d. the website is not secure.
Answers: 1
Computers and Technology, 24.06.2019 00:30
Which boolean operator enables you to exclude a search term? a} not b} and c} or d} plus
Answers: 1
Have you ever seen a Magic 8 ball? You ask it a yes-no question and then shake it to get a random re...
Mathematics, 11.05.2021 21:00
Mathematics, 11.05.2021 21:00
Physics, 11.05.2021 21:00
History, 11.05.2021 21:00
Mathematics, 11.05.2021 21:00
Mathematics, 11.05.2021 21:00
History, 11.05.2021 21:00
Health, 11.05.2021 21:00