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
Sati [7]
3 years ago
13

A programmer wants to write a procedure that calculates the net elevation - total number of feet a traveler goes up and down. Fo

r example, looking at the first 3 segments of travel, the net elevation is 7 feet (up 3, up 1, down 3). Write procedure (in either JavaScript or pseudocode) called processPath(data) that: Accepts a list of elevation data as a parameter For every value in the list Compute the absolute difference between that value and the value next to it on the path Add the difference to a running total Return the total elevation traveled
Computers and Technology
1 answer:
ch4aika [34]3 years ago
3 0

Answer:

Pseudocode

////////////////////////////////////////////////////////////////////////////////////////////////////////////

Integer netElevation(list of elements of type elevation - type and number)

<em>function open</em>

   Define running total = 0

   for each element from list

   <em>loop open</em>

       elevation type = element[i].type

      if (elevation type == Up)

           running total = running total + element[i].number

       else

           running total = running total - element[i].number

   <em>loop close</em>

   return running total

<em>function close</em>

You might be interested in
A _____ is usually a smaller version of a data warehouse
Strike441 [17]
A ( micro ) is usually a smaller version of a data warehouse
4 0
2 years ago
What is the advantage of learning through story compared to learning through personal experience?
Inessa [10]

Answer:

Personal Experience

Explanation:

If a story is based on a personal experience then yes, the two doesn't matter. <em>However</em>, usually learning through personal experience is better because you learn firsthand while stories are written from a different perspective.

6 0
2 years ago
Read 2 more answers
Kim agrees. You get the equipment from the truck and begin working. Kim approaches you as you are installing the modem and is a
Angelina_Jolie [31]
Ask your friends if they are doing something wrong with your friends and friends
6 0
1 year ago
What is the transfer rate of DDR memory?
hoa [83]

DDR memory is 64-bit so that means that it is 64

5 0
2 years ago
3.What are the pros and cons of using a linked implementation of a sparse matrix, as opposed to an array-based implementation
weqwewe [10]

Answer:

speed and storage

Explanation:

The pros and cons of both are mainly in regards to speed and storage. Due to linked lists elements being connected to one another it requires that each previous element be accessed in order to arrive at a specific element. This makes it much slower than an array-based implementation where any element can be quickly accessed easily due to it having a specific location. This brings us to the other aspect which is memory. Since Arrays are saved as a single block, where each element has a specific location this takes much more space in the RAM as opposed to a linked implementation which is stored randomly and as indexes of the array itself.

Array Implementation:

  • Pros: Much Faster and Easier to target a specific element
  • Cons: Much More Space needed

Linked Implementation

  • Pros: Less overall space needed
  • Cons: Much slower speed.
5 0
3 years ago
Other questions:
  • A ____________ variable is available throughout a program.
    7·1 answer
  • NEED THIS NOW PLEASE!!!! (I AM NOT JOKING I HAVE TO SUBMIT IN 5 MINUTES)
    13·2 answers
  • Colin Mackay Inc., a software company with its head office in Amsterdam, has employees across three continents. The company's pr
    10·1 answer
  • When creating a presentation you should use a blank as a starting point?
    15·1 answer
  • Now tell me how be rich like Bill Gates
    6·1 answer
  • What direction would a sprite go if you constantly increased its x property? Your answer What direction would a sprite go if you
    7·1 answer
  • Some commands listed in a menu cannot be selected.<br><br><br> True or False
    13·2 answers
  • What are the paparazzi?
    8·1 answer
  • Please NEED HELP ASAP WILL MARK BRAINLIEST ONLY #8
    8·1 answer
  • Alexis plans to stop trading once she lose 5% of her account balance, her account balance is $215.00. How much money is she will
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!