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
Read the following characteristic:
Ivanshal [37]

Answer:

A goal of procedural programming

An advantage of object oriented programming

A disadvantage of object oriented programming

A drawback of procedural programming

3 0
2 years ago
a new client has indicated that they are exercising due to advice from their physician, but they are generally amotivated. what
Orlov [11]

The factor that is a best choice for the personal trainer in their initial meeting is option a: Inquire further about what their motives are for participating.

<h3>What are the motives in motivation?</h3>

Psychologists is known to have shared motives into three types which are:

  • Biological motives
  • Social motives
  • Personal motives.

Note that the goal that is to be meant is for the fulfillment of  the client want or their  need.

Therefore asking the right question will go a long way in satisfying them. So, The factor that is a best choice for the personal trainer in their initial meeting is option a: Inquire further about what their motives are for participating.

Learn more about personal trainer from

brainly.com/question/19462080
#SPJ1

A new client has indicated that they are exercising due to advice from their physician, but they are generally amotivated. What would be the best choice for the personal trainer in their initial meeting?

Inquire further about what their motives are for participating.

Create a plan for overcoming barriers.

Establish short- and long-term goals.

Start establishing an emotional support system.

5 0
2 years ago
What is the default file name in Word??? Plzzzz help me!!!!!
kondaur [170]
If your document does not have any text in it and you haven't set the “Title” property, Word inserts “DocX.docx” as the file name, where the “X” is a number that depends on how many new documents you have created during your current Word session.
7 0
3 years ago
Read 2 more answers
When you use the Copy and Paste commands, you are accessing...?
vampirchik [111]
C!!!!!!!!!!!!!!!!!!!
3 0
3 years ago
Read 2 more answers
What are the three aspects to consider when taking and critiquing photograph?
svlad2 [7]
The angle
Steady Hands
Focusing on the right lighting
3 0
3 years ago
Other questions:
  • About n processes are time-sharing the CPU, each requiring T ms of CPU time to complete. The context switching overhead is S ms.
    12·1 answer
  • What is an embedded system. Give examples
    12·1 answer
  • Corona and app inventor can be used to develop ________.
    10·1 answer
  • What are 7 good facts on Computer Viruses?
    10·1 answer
  • If you’re presenting in a darkened room, what text and background should you use to provide maximum readability?1) Light text on
    5·1 answer
  • 1- Which of the following is the java keyword used to declare a class?
    5·2 answers
  • What is most important for you to choose before you build a network?
    6·1 answer
  • What are the trinity of the computer system
    15·1 answer
  • Which of the following emergencies are weather-related? A. Ice storm B. Hurricane C. Earthquake D. A and B
    10·2 answers
  • Merging refers to dividing a single cell into multiple cells. *TrueFalse
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!