1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
UkoKoshka [18]
4 years ago
10

"Simon Says" is a memory game where "Simon" outputs a sequence of 10 characters (R, G, B, Y) and the user must repeat the sequen

ce. Create a for loop that compares the two strings starting from index 0. For each match, add one point to userScore. Upon a mismatch, exit the loop using a break statement. Ex: The following patterns yield a userScore of 4: simonPattern: R, R, G, B, R, Y, Y, B, G, Y
import java.util.Scanner;

public class SimonSays {
public static void main (String [] args) {
String simonPattern = "";
String userPattern = "";
int userScore = 0;
int i = 0;

userScore = 0;
simonPattern = "RRGBRYYBGY";
userPattern = "RRGBBRYBGY";


System.out.println("userScore: " + userScore);

return;
}
}
Computers and Technology
1 answer:
kotykmax [81]4 years ago
5 0

Answer:

import java.util.Scanner;

public class SimonSays{

    public static void main(String []args)

    {

       String simonPattern = "";

       String userPattern = "";

       int userScore = 0;

       int i = 0;

       userScore = 0;

       simonPattern = "RRGBRYYBGY";

       userPattern = "RRGBBRYBGY";

       for(i=0 ; i<simonPattern.length(); i++)

       {

           if(simonPattern.charAt(i)==userPattern.charAt(i))

           {

               userScore+=1;

           }

           else

           {

               break;

           }

           

           

       }

       System.out.println("userScore: " + userScore);

 

    }

}

Explanation:

the string method charAt() is used to access each character of the string.

You might be interested in
Why would it be unusual to find a fossil of an organism’s eye?
Slav-nsk [51]
<span>The preservation of anything other than mineral skeletons is (with a few exceptions described below) an extremely rare event. Anything that can decay is likely to be lost. Fur, skin, internal organs – all are immensely vulnerable to the destruction by bacteria, fungi and scavengers that assure their recycling back into the ecosystem. </span>
8 0
3 years ago
Can someone please help me with this pleaseeeee
vladimir1956 [14]

Answer:

The answer of this question is given below into explanation section

Explanation:

answer (a)

I visited the carrerbuilder dot com and search for data entry job. The link of the posting is given below

https://www.careerbuilder.com/jobs?utf8=%E2%9C%93&keywords=data+entry&location=

answer(B)-Requirements of the the job

  • Previous office experience (data entry experience a plus)
  • Proficient with a computer and computer software (Excel knowledge required)
  • Excellent verbal and written communication skills
  • The ability to multi-task and work in a team-oriented environment
  • High School Diploma / G.E.D.
  • Ability to meet background check and drug screening requirements

answer(C)-Tasks of the job

  • Open, sort, and scan documents
  • Track all incoming supplies and samples
  • Data entry of samples that come in
  • Assist with documentation and maintaining of data
  • Prepare and label information for processing
  • Review and correct any data entry error or missing information

answer (d)

I have 3 years of experience in organization administration where I managed the organization data, generated reports and communicated verbally and written within the organization efficiently.

6 0
3 years ago
What did Peter and Rosemary do for a living?<br>​
marta [7]

Answer:

Peter and Rosemary Grant are distinguished for their remarkable long-term studies demonstrating evolution in action in Galápagos finches. They have demonstrated how very rapid changes in body and beak size in response to changes in the food supply are driven by natural selection.

Explanation:

please

6 0
3 years ago
Would it be possible to make VR technology in a way that our brain sees imagined experiences using simple impulses (like words)
Ludmilka [50]

Answer:

theoretically yes. we would need to cross and langue gap because our brain signals wouldn't understand words

Explanation:

educated quess

7 0
2 years ago
as the reader, you can figure out the writer's ____ based on his or her word choice and sentence structure a. purpose b. audienc
Misha Larkins [42]

Answer:

my choice purpose

Explanation:

the writer simply writes with a purpose to make his audience understand it's with the purpose that he writes

8 0
3 years ago
Other questions:
  • Devices such as monitors and printers that are connected to a computer are called ________.
    12·1 answer
  • A DSLR camera is made up of two parts. They are
    13·2 answers
  • In Java Write a program that prompts the user for a name (any String value would work for testing), and print a hello message to
    15·1 answer
  • What can you do to make sure you have a healthy credit report
    13·2 answers
  • Que Inventos Importantes se Crearon durante la edad de agua y viento
    11·1 answer
  • If you want a user to enter exactly 20 values, which loop would be the best to use?
    9·1 answer
  • Does anyone know this ? this website is scratch btw.
    10·1 answer
  • Apart from the OOPs concepts learned in this lesson, identify additional concepts and write an essay on their functions. Explain
    9·1 answer
  • 1.<br> _g<br> clue: fret; become worried<br> 2.<br> Fret become worried
    10·1 answer
  • What does playstation network is currently undergoing maintenance?.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!