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
kow [346]
3 years ago
14

Here is the API for a robot library. // moves the robot forward function moveForward(); // turns the robot to the left function

rotateLeft(); // turns the robot to the right function rotateRight(); // checks if a robot can move in any direction // direction {string} - the direction to be checked // return {Boolean} - true if the robot can move in that direction, otherwise returns false function canMove(direction); Which code segment will guarantee that the robot makes it to the gray square without hitting a wall or a barrier (black square)
Computers and Technology
1 answer:
kupik [55]3 years ago
5 0

Answer:

Option (A)

Explanation:

See attachment for options

From the options, the code segment of option (A) answers the question and the explanation is as follows:

I added a second attachment which illustrates the movement

function (solveMaze) {

moveForward(); ---- The robot moves up (to position 1)

moveForward(); ---- The robot moves up (to position 2)

rotateRight(); ---- The robot changes where it faces (however, it is still at position 2)

<em>while(canMove("forward")) { moveForward(); } </em>---- This is repeated until the robot reaches the end of the grid (i.e. position 3 and 4)

rotateLeft(); ---- The robot changes where it faces (however, it is still at position 4)

moveForward(); ---- The robot moves up to the gray square

You might be interested in
The program is to be answered in Java Programming not C++ Please answer the following: Modify the BarChart program to accept the
Solnce55 [7]

Answer:

import java.util.Scanner;

public class BarChart {

public static void main(String[] args) {

Scanner sc=new Scanner(System.in);

//take input from user

System.out.println("Enter Score");

int score=sc.nextInt();

int count=score/10;

int i=1;

//print horizontal bar

//if you want to print vertical bar then simply change into print which is replace by println

while(i<=count)

{

System.out.print("*");

i++;

}

}

}

Explanation:

6 0
3 years ago
Which type of cloud computing offers easily accessible software and applications on the machines?
blsea [12.9K]

Answer

Software as a service

Explanation

Software as a service (SAAS) is a software distribution model in which a third-party provider hosts applications and makes them available to customers over the Internet. SAAS is one of three main categories of cloud computing.

Cloud computing is the use of internet  to access hardware and software service instead of keeping regular physical hardware and software in the office space. Basically it is the practice of using a network of remote servers hosted on the Internet to store, manage, and process data, rather than a local server or a personal computer.

6 0
3 years ago
How would you compare and contrast the impact of the printing press with the impact of the internet?
Ilia_Sergeevich [38]
<span>The impact of the printing press with the impact of the internet is that </span>internet is an easy access compared with the printing press. Changes affect society, there are more ways to access info today through the internet.  internet spreads information faster and can be shared quickly.  
4 0
3 years ago
The first step in creating photographs with good backgrounds is which of the following? Learning to see the background before ta
defon

Oh I got this! I'm a professional photographer! The answer is Leaning to se the background before taking the photograph.

Plz mark brainliest! So glad I could help, and Have an AWESOME day!!!

4 0
3 years ago
Read 2 more answers
Create a function named first_a that uses a list comprehension. The function will take a single integer parameter n. Find every
aivan3 [116]

Answer:

def first_a(n):

   lst1 =[x for x in range(1,n+1)if x%6==0 or x%11 ==0]

   print(lst1)

Explanation:

Above is a function in python programming language. We have used list comprehension to check numbers that are multiples of 6 or 11 in a range.

When this function is called it will receive an argument (n) of type integer, a range will then be generated from 1 to n+1 since n is inclusive. The modulo operator is used to determine is a value is a multiple of 6 or 11, since their multiples will evaluate to 0

3 0
3 years ago
Other questions:
  • Your Economics teacher has asked you to create a chart showing how supply and demand affects the price of gasoline. Which applic
    13·2 answers
  • Type the correct answer in the box. Spell the word correctly. What aspect should you consider before adding pictures to a docume
    7·2 answers
  • True / False<br> 1. A byte is a standardized unit of measure that is always 8-bits.
    7·1 answer
  • Routing connects different network segments and decides where __________are sent to
    7·1 answer
  • When you check your hard drive to see how much space is available, you are checking your
    15·1 answer
  • I need to reverse a inputted word using for loops with range 0 to the input word and increment 1.
    5·1 answer
  • How is information processed within a<br> motherboard between the hard drive, CPU and RAM,
    12·1 answer
  • The ratio of sparrows to bluejays at the bird sanctuary was 5 to 3 If there were 15 bluejays in the sanctuary, how many sparrows
    12·1 answer
  • What makes a recipe for a meal an example of an algorithm?
    6·1 answer
  • You want to add a caption to a table. which tab contains this option?.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!