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
zlopas [31]
3 years ago
6

Silas develops this algorithm to compute the calories burned for an activity for a given number of minutes and body weight: If t

he activity is running, compute caloriesPerMin by dividing weight by 10.5 If the activity is walking, compute caloriesPerMin by dividing weight by 15.5 Compute numCalories by multiplying caloriesPerMin by numMinutes He implements the algorithm in an app, and users soon ask for the ability to compute the total calories for multiple sessions of walking or running. What structure must be added to the original algorithm so that it can compute the total across multiple sessions
Computers and Technology
1 answer:
NNADVOKAT [17]3 years ago
7 0

Answer:

Explanation:

This change can be accomplished in one of two ways. The first being creating a global variable that adds to it and saves the total calories burned at the end of every session. This global variable can then be called at any time to show the total number of calories burned in all previous sessions combined. The other option would be to create a list of Session objects. Each object would hold all the information regarding each session including calories burned. Then create a function that loops through this list, adding the total calories burned in each session and outputting the total.

You might be interested in
What is the full meaning of ICT
leva [86]
Information commination technology :)
6 0
4 years ago
Read 2 more answers
A species of snake lives in a rainforest. Which would be an adaptation for this
raketka [301]

Answer:

The Answer is D

6 0
3 years ago
Read 2 more answers
Comment on the following 2 arrays. int *a1[8]; int *(a2[8]); a1 is pointer to an array; a2 is array of pointers a1 is pointer to
Hitman42 [59]

Answer:

The answer is "a1 and a2 is an array of pointers".

Explanation:

In this question, A collection of pointers refers to an array of elements where each pointer array element points to a data array element. In the above-given statement, the two-pointer type array "a1 and a2" is declared that holds the same size "8" elements in the array, and each element points towards the array's first element of the array, therefore, both a1 and a2 are pointer arrays.

5 0
3 years ago
i need a moderator or someone to answer this :/ why do i keep getting notifications that i have a new chat or a new answer/comme
Lyrx [107]

Answer:

It happens to me as well. Maybe check emails?  It could also be a bug.

Explanation:

4 0
3 years ago
Read 2 more answers
)What item is at the front of the list after these statements are executed?
Dominik [7]

Answer:

C.Rudy

Explanation:

A deque waitingLine is created.Then Jack is added to front of the deque first.After that Rudy is added to the front of the deque.AFter that Larry and sam are inserted at the back.So the last item inserted at the front is front of the deque.So Rudy was the last item inserted at the front.

Hence we conclude that the answer is Rudy.

4 0
3 years ago
Other questions:
  • Computers are said to use binary data because all computer data is simply a series of Os and 1s.
    10·1 answer
  • Determine encryption that is needed to provide security for the company’s system. This will include plans to address: Passive an
    11·1 answer
  • Describe one type of technology that is useful in producing images from space.
    9·1 answer
  • i will be doing an interview to someone so plz comment down below something random and you will automatically enter
    11·1 answer
  • What is output by the following C# code segment?int temp;temp = 180;while ( temp != 80 ) {if ( temp > 90 ) {Console.Write( "T
    7·1 answer
  • Give an O(log m + log n)-time algorithm that takes two sorted lists of sizes m and n, respectively, as input and returns the ith
    7·1 answer
  • Importance of availability of mobile devices content that is of interest for users.
    12·1 answer
  • __________ is a growing practice in cooperative farmingassociations to pool and sell the fruit as a common commodity underthe br
    6·1 answer
  • One of the driving forces in operating system evolution is advancement in the underlying hardware technology.
    8·1 answer
  • What color mode would you use when designing for web & devices?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!