ESP Game Write a program that tests your ESP (extrasensory perception). The program should randomly select the name of a color from the following list of words: Red, Green, Blue, Orange, Yellow To select a word, the program can generate a random number. For example, if the number is 0, the selected word is Red, if the number is 1, the selected word is Green, and so forth. Next, the program should ask the user to enter the color that the computer has selected. After the user has entered his or her guess, the program should display the name of the randomly selected color. The program should repeat this 10 times and then display the number of times the user correctly guessed the selected color.
Max Function
Statistical function is of many categories. One of them is a MAX function. The MAX function returns the largest value from the list of arguments passed to it. MAX function always ignores the empty cells when performing the calculation.
Power Function
A power function is a type of single-term function. Its definition states that it is a variable containing a base value raised to a constant value acting as an exponent. This variable may also have a coefficient. For instance, the area of a circle can be given as:
I need help with creating a Java program described below:
Counting primes.
ESP Game
Write a program that tests your ESP (extrasensory perception). The program should randomly select the name of a color from the following list of words:
Red, Green, Blue, Orange, Yellow
To select a word, the program can generate a random number. For example, if the number is 0, the selected word is Red, if the number is 1, the selected word is Green, and so forth.
Next, the program should ask the user to enter the color that the computer has selected. After the user has entered his or her guess, the program should display the name of the randomly selected color. The program should repeat this 10 times and then display the number of times the user correctly guessed the selected color.

Initialize Variables:
- Create an array of colors: {"Red", "Green", "Blue", "Orange", "Yellow"}.
- Set the number of rounds to 10.
- Initialize a variable to track the number of correct guesses.
Start Game:
- Display a welcome message.
Repeat for each round (10 rounds):
- Generate a random index to select a color from the array.
- Retrieve the color using the randomly generated index.
- Ask the user to guess the color.
- Display the selected color.
- Check if the user's guess matches the selected color:
- If yes, increment the correct guesses counter and display "Correct!"
- If no, display "Incorrect. The correct color was: " followed by the selected color.
- Move to the next round.
Display Results:
- After 10 rounds, display the total number of correct guesses out of 10.
- End Game
Step by step
Solved in 4 steps with 2 images









