Ask Question
8 February, 15:13

How do I write code in Java for "A spinner for a game has four possible options: blue, red, yellow, green. The chance of landing on each option is equal. Simulate using the spinner 15 times and reporting the resulting color."?

+2
Answers (1)
  1. 8 February, 16:27
    0
    What you need to do is to generate a random number between 1 and 4 (or0 and 3) 15 times. Each time you generate a number, you figure out which number it is and keep track of how many times you've seen that number. At the end, print out how many of each number you got.

    Good luck!
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “How do I write code in Java for "A spinner for a game has four possible options: blue, red, yellow, green. The chance of landing on each ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers