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
SVEN [57.7K]
2 years ago
8

(4 points.) Write an algorithm (i.e., step-by-step instructions) via which someone could walk or drive from some origin to some

destination, perhaps a path that you yourself tend to travel. Take care to specify what the origin and destination that you have in mind. And take care to use loops and conditions as needed, particularly if there might be obstacles (e.g., red lines). Assume that your algorithm will be executed by a robot (or lost friend) who will follow your directions precisely, so avoid ALL ambiguity!
Computers and Technology
1 answer:
Elis [28]2 years ago
5 0

Answer:

The algorithm is as follows :

1. Record Current Position, Final Destination

2. While Current Position is not Final Destination, repeat the following:

2.1 If destination location is up then:

  2.1.1 If an obstacle is directly above you then:

     2.1.1.1 Look for alternate position (left, right, down)

     2.1.1.2 If alternate position is found then

        2.1.1.2.1 Move there

        2.1.1.2.2 Record Current Position

     2.1.1.3 If no alternate position is found then

        2.1.1.3.1 Call for help

        2.1.1.3.2 End

  2.1.2 If no obstacle is directly above you then:

     2.1.2.1 Move up

     2.1.2.1 Record Current Position

2.2 If destination location is down then:

  2.2.1 If an obstacle is directly below you then:

     2.2.1.1 Look for alternate position (left, right, up)

     2.2.1.2 If alternate position is found then

        2.1.1.2.1 Move there

        2.2.1.2.2 Record Current Position

     2.2.1.3 If no alternate position is found then

        2.2.1.3.1 Call for help

        2.2.1.3.2 End

  2.2.2 If no obstacle is directly below you then:

     2.2.2.1 Move down

     2.1.2.1 Record Current Position

2.3 If destination location is right then:

  2.3.1 If an obstacle is directly by your right then:

     2.3.1.1 Look for alternate position (down, up, left)

     2.3.1.2 If alternate position is found then

        2.3.1.2.1 Move there

        2.3.1.2.2 Record Current Position

     2.3.1.3 If no alternate position is found then

        2.3.1.3.1 Call for help

        2.3.1.3.2 End

  2.3.2 If no obstacle is directly by your right then:

     2.3.2.1 Move right

     2.3.2.1 Record Current Position

2.4 If destination location is left then:

  2.4.1 If an obstacle is directly by your left then:

     2.4.1.1 Look for alternate position (down, up, right)

     2.4.1.2 If alternate position is found then

        2.4.1.2.1 Move there

        2.4.1.2.2 Record Current Position

     2.4.1.3 If no alternate position is found then

        2.4.1.3.1 Call for help

        2.4.1.3.2 End

  2.4.2 If no obstacle is directly by your left then:

     2.4.2.1 Move left

     2.4.2.1 Record Current Position

Explanation:

<em>The algorithm is straight forward.</em>

<em>All it does is to check for available position and move into the position if there is any available.</em>

<em>It keeps checking and moving until an obstacle prevents it from moving.</em>

You might be interested in
When adding a background to a Web page, it can be _____. a. a solid color b. a fill effect c. an image d. all of the above
Mars2501 [29]

D, all of the above!

7 0
3 years ago
Custom actions help your users by
Vladimir79 [104]

Answer:

D) Making it fast and easy to interact with information in your organization.

Explanation:

PLEASE MARK ME AS BRAINLIEST

3 0
3 years ago
It is a small hand tool used generally in decorative works such as making garnishes
SSSSS [86.1K]

it will probably be a channel knife

6 0
3 years ago
A bastion host allows the firewall to connect to the internal network and the perimeter network.TrueFalse
Delicious77 [7]

Answer: True

Explanation:

 Yes, the given statement is true, as the bastion host basically require two individual firewall that connect with the internal network and perimeter network by using the perimeter configuration.

Perimeter network basically isolate the the bastion host from the internal network. Bastion host is the serve as the host that connect with the external world. As, perimeter network is one of the type of the firewall network system.

Therefore, the internal network and the perimeter network basically connect with the firewall by using bastion host.

3 0
2 years ago
What refers to the processing of a substance or an object so that it may be used again?
Pavel [41]

Answer:

recycling is the answer

8 0
1 year ago
Read 2 more answers
Other questions:
  • What types of automation device might require specialist installer training?
    5·1 answer
  • Identify the mobile device deployment option that gives the user flexibility to select a device, but allows the company to contr
    5·1 answer
  • A difference between crt monitors and flat-panel displays is that most flat-panel displays use digital signals to display images
    8·1 answer
  • A computer is unable to access the network. when you check the led lights near the computer's network port, you discover the lig
    6·1 answer
  • Having just one error on a cover letter may eliminate an applicant from being considered for employment?
    13·1 answer
  • Baking Cookies. Sweet Dough Inc. bakes cookies—a popular dessert—based on the quantities ordered by their customers. Three raw m
    12·1 answer
  • Write a program to enter a number and test if it is greater than 45.6. If the number entered is greater than 45.6, the program n
    10·1 answer
  • If a user inserts a piece of clip art over some text but does not want the art to block the text, the user should select
    14·2 answers
  • Create another method: getFactorial(int num) that calculates a Product of same numbers, that Sum does for summing them up. (1,2,
    7·1 answer
  • How do I make my header line visible?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!