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]
3 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]3 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
Assuming deq is a deque object, the expression deq.push_front(elem) deletes the first element from deq.
horrorfan [7]

Answer: False

Explanation:

This code code not deletes element from deq. This insert element at the beginning of deq. if it was deq.pop_front(elem) then it would have deleted the first element.

Therefore, it is false.

4 0
3 years ago
During the installation of Windows Server 2019 Standard Edition, you encounter a disk that is marked as Disk 0 Unallocated Space
sp2606 [1]

There are different kinds of system software.  What should you do to complete the installation on this disk is to Create a new partition and then perform the installation

<h3>How are Hands-On Projects done?</h3>

This kind of project are often  completed in the right order that they were given and it often take about three hours or less to complete it in general. This projects needs:

• A system that has Windows Server 2019 that is said to be already installed based on  Hands-On Project 1-1/1-2.

• A Windows Server 2019VM2 virtual machine  also installed based  on Hands-On Project 3-5.

Note that when one wants to install an operating system, one has to  drive or make partition available so as to copy all the files..

During the installation of Windows Server 2019 Standard Edition, you encounter a disk that is marked as Disk 0 Unallocated Space on the Windows Setup wizard.

What should you do to complete the installation on this disk?

Create a new partition and then perform the installation

Load the device drivers for the Disk

Click Next to proceed with the installation

Format the disk using the Format option

Learn more about Windows Server from

brainly.com/question/25554117

6 0
2 years ago
he wide range of materials used to create the Buk (mask) of the Torres Strait has been interpreted as evidence of the islanders'
Kamila [148]

Answer:

The wide range of materials used to create the Buk (mask) of the Torres Strait has been interpreted as evidence of the islanders' far-reaching trade networks

C preference for local natural resources

Explanation:

The Buk (mask) aged middle to late 19th century C.E., was located in Australia, Mabuiag Island, Queensland, Torres Strait, which is between Australia and Papua New Guinea with many small mostly uninhabited islands around. Archaeological excavations show people´s  arrival at  Mabuiag islands around 7,300 years ago, being very dependent on ocean´s products to survival.

Few surviving pieces, made out of local resources materials such as turtle shell, wood, fiber, cassowary feathers, resin and paint, tell us feathers were a throughoutly artistic material used in Oceania , but  turtle shells masks were Torres Strait´s people hand-crafted and unique hallmark to be used during assorted ceremonies.

7 0
3 years ago
Heads or tails
Pani-rosa [81]

import random

heads = 0

tails = 0

i = 0

while i < 1000:

   rnd_value = random.randint(1, 2)

   if rnd_value == 1:

       heads += 1

       print("heads")

   else:

       tails += 1

       print("tails")

   i += 1

print("Heads appeared {} times and tails appeared {} times".format(heads, tails))

I hope this helps!

5 0
3 years ago
Question 9
Irina18 [472]

Answer:

Outsourcing

Explanation:

The boom in collaboration between U.S. companies and workforces in India created a need for Outsourcing.

I believe this is correct, but I'm not 100% certain.

8 0
2 years ago
Other questions:
  • In what year did commercial use of the Internet become available? 1991 1996 1999 2001
    9·1 answer
  • If you were looking for a record in a very large database and you knew the ID number, which of the following would be the most d
    6·1 answer
  • What does the opacity effect do
    8·2 answers
  • _____ is a predefined format used for text the can include multiple font formatting features
    13·1 answer
  • vehicles power system is disabled as the result of a collision, can an ACN system using a paired cell phone work to notify a PSA
    7·1 answer
  • What is a computer?
    9·2 answers
  • If a computer truncatesall numbers to two decimal places, compute the error forthe following: 23.345+222.34911)0.12)0.01413)0.14
    15·1 answer
  • Exercise 3.7.1: Proving statements about odd and even integers with direct proofs. info About Each statement below involves odd
    6·1 answer
  • Write a program that demonstrates the class by creating a Payroll object, then asking the user to enter the data for an employee
    8·1 answer
  • X= [12,67,89,34,56,90,67]
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!