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
Oksana_A [137]
2 years ago
5

2.17.5 coders answers

Computers and Technology
1 answer:
BlackZzzverrR [31]2 years ago
5 0

Answer:

start();

if(colorIs(Color.blue)){

paint(Color.red);

if(frontIsClear());

move();

}else{

if(colorIs(Color.red)){

paint(Color.blue);

if(frontIsClear());

move();

}

}

if(colorIs(Color.blue)){

paint(Color.red);

if(frontIsClear());

move();

}else{

if(colorIs(Color.red)){

paint(Color.blue);

if(frontIsClear());

move();

}

}

if(colorIs(Color.blue)){

paint(Color.red);

if(frontIsClear());

move();

}else{

if(colorIs(Color.red)){

paint(Color.blue);

if(frontIsClear());

move();

}

}

if(colorIs(Color.blue)){

paint(Color.red);

if(frontIsClear());

move();

}else{

if(colorIs(Color.red)){

paint(Color.blue);

if(frontIsClear());

move();

}

}

if(colorIs(Color.blue)){

paint(Color.red);

if(frontIsClear());

move();

}else{

if(colorIs(Color.red)){

paint(Color.blue);

if(frontIsClear());

move();

}

}

if(colorIs(Color.blue)){

paint(Color.red);

if(frontIsClear());

move();

}else{

if(colorIs(Color.red)){

paint(Color.blue);

if(frontIsClear());

move();

}

}

if(colorIs(Color.blue)){

paint(Color.red);

if(frontIsClear());

move();

}else{

if(colorIs(Color.red)){

paint(Color.blue);

if(frontIsClear());

move();

}

}

if(colorIs(Color.blue)){

paint(Color.red);

if(frontIsClear());

move();

}else{

if(colorIs(Color.red)){

paint(Color.blue);

if(frontIsClear());

move();

}

}

if(colorIs(Color.blue)){

paint(Color.red);

if(frontIsClear());

move();

}else{

if(colorIs(Color.red)){

paint(Color.blue);

if(frontIsClear());

move();

}

}

if(colorIs(Color.blue)){

paint(Color.red);

if(frontIsClear());

}else{

if(colorIs(Color.red)){

paint(Color.blue);

if(frontIsClear());

}

}

function start(){

}

Q. 5.1.3: Move to Wall

Ans:

function start(){

while(frontIsClear()){

move();

}

}

I apologize if its incorrect

You might be interested in
Why is computer science hardware needed to solve problems with computers?
dybincka [34]

Answer:

Computer science is the study of problems, problem-solving, and the solutions that come out of the problem-solving process. Given a problem, a computer scientist's goal is to develop an algorithm, a step-by-step list of instructions for solving any instance of the problem that might arise. ... Algorithms are solutions.

Explanation:

#CarryOnLearning

3 0
2 years ago
Freeeee BRAINLIESTHBJHBJHB
andre [41]

Answer:A lot of people cry when they cut an onion. The trick is not to form an emotional bond.lol

4 0
3 years ago
Read 2 more answers
Write a program that assigns values to
ss7ja [257]

Explanation:

10:A program that assigns the sum 20,30,40

20: input 20,30,40

30:sum input

40: print total

End

3 0
2 years ago
Which technology concept uses computer resources from multiple locations to solve a common problem?
kramer

Answer: Sounds like you are talking about “Distributed memory systems” which use multiple computers to solve a common problem, with computation distributed among the connected computers (nodes) and using message-passing to communicate between the nodes.

8 0
3 years ago
A DTP firm has published and printed flyers for an upcoming fundraising event. In which section of the flyer would you find the
Annette [7]
Typically the contact details for the firm would be at the bottom of the flyer.

This is to allow room for the main event itself to be advertised in top and central area of the flyer real-estate.
7 0
2 years ago
Read 2 more answers
Other questions:
  • Which password is an ideal and secure password?
    6·2 answers
  • According to COSO, which of the following components addresses the need to respond in an organized manner to significant changes
    14·1 answer
  • Susan is keen to learn various safe ways to browse the Internet. She is looking for suggestions that would help her. Which activ
    15·2 answers
  • Alison retrieved data from a company database containing personal information on customers. When she looks at the SSN field, she
    14·1 answer
  • Reversing the elements of an array involves swapping the corresponding elements of the array: the first with the last, the secon
    6·1 answer
  • Select the correct answer from each drop-down menu.
    8·1 answer
  • What is the main difference between a search engine and a web browser?
    6·2 answers
  • 8.10 quiz edhesive A swap is: a variable used to find the smallest value in an array an algorithm used to find a value in an arr
    12·1 answer
  • The process of learning by making mistakes and by trial and error is called _____.
    6·1 answer
  • Why does a computer need memory​
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!