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
If you have a field that needs a unique number that's one greater than the last field entry, what field type would you typically
Alik [6]
AutoNumber it can do it all alone and put the number(If you don’t know the number to put).
4 0
3 years ago
A media file refers to what kind of file? A. Clip art
prohojiy [21]

Waveform Audio (.wav) is a common file format. Created by Microsoft and IBM, WAV was one of the first audio file types developed for the PC. WAV files are defined as lossless, meaning that files are large and complete; nothing has been lost.

your answer will be

<h2><em><u>C; image</u></em></h2>
5 0
3 years ago
Read 2 more answers
What are some of the functions in the Consolidate dialog box? Check all that apply.
goblinko [34]

Answer:

sum average and count is the answer

5 0
3 years ago
#Electrical Engineering
GrogVix [38]

Answer:

yes

Explanation:

where's our question

5 0
3 years ago
Cloud computing will offer applications that are _______.
Komok [63]
B. only accesible over the internet
8 0
3 years ago
Read 2 more answers
Other questions:
  • All languages from the second generation on must be translated into machine language for the computer to be able process the inp
    8·1 answer
  • Which is the last step in conducting a URL search?
    14·1 answer
  • Kyra needs help planning what images and text to use in her web page what technique can help her
    5·2 answers
  • Which of the following should you NOT do when using CSS3 properties to create text columns for an article element? a. make the c
    12·2 answers
  • The company where Derek works has tasked him with setting up and securing a SOHO router. He wants to make sure the wireless netw
    11·1 answer
  • If you want to present slides to fellow students your coworkers which productivity software should you use to create them
    15·2 answers
  • __________ is a growing practice in cooperative farmingassociations to pool and sell the fruit as a common commodity underthe br
    6·1 answer
  • The 10 and 2 o'clock hand position on the steering wheel is no longer recommended because _____.
    13·1 answer
  • in a stop-and-wait arq system, the bandwidth of the line is 1 mbps, and 1 bit takes 10 ms to make a round trip. if the system da
    12·1 answer
  • Channel logging tokens can be set to all but:________. a. Relaxed b. Strict c. Both versions d. None
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!