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
You type a web address in your web browser. order the steps, which describe the internet name resolution process for the web add
padilas [110]
First of all let's make it clearer, what is meant by "domain name resolution"?
"Domain name resolution" is the process of translating your web address into its corresponding IP address. e.g. translating (www.brainly.com to 104.16.32.180)
Computers cannot understand the human language they only can understand numbers that's why we need this process.

So, the process (in a very simple way) is divided into four steps:
1) Lookup "root nameservers"
2) Lookup "Top Level Domain TDL nameservers"
3) Lookup "domain nameservers"
4) Lookup "subdomain nameservers" [if exist]

If you still confused please check out this video https://www.youtube.com/watch?v=BCjUbpIzRs8&index=10&list=PL4bq-KmCeyBmMvBB3-RT6ikdp8ljV9GeT

6 0
3 years ago
Your school computer library has a network that connects computers and devices within a few small rooms. what type of network do
Pachacha [2.7K]
A routed and secured network which can send internet access to all computers 

3 0
3 years ago
Which are the best examples of costs that should be considered when creating a project budget?
Vlada [557]

Answer:

I would say material costs and hiring costs, idk if that helps or not

4 0
3 years ago
If I wanted to repeat an action such as a heading for a paper, it would be helpful to _____. create a citation create a caption
salantis [7]
Um... Copy and paste
7 0
4 years ago
Read 2 more answers
________ use statistics to anticipate customers withdrawals. ________ use statistic to calculate probable life expectancy to hel
Fudgin [204]

Answer:

Banks

Insurance companies

Explanation:

3 0
3 years ago
Other questions:
  • Tanya has received an email, apparently from her bank, stating that some of her records were lost during server maintenance work
    13·2 answers
  • Because you do not know every possible future use for the data TerramEarth collects, you have decided to build a system that cap
    15·1 answer
  • The essence of strategy is ____, so competitive advantage is often gained when an organization tries a strategy that no one has
    15·1 answer
  • Motorcycles have two or three wheels, a seat for the rider and at least a ____ horse-powered engine.
    15·1 answer
  • In Alphatech Systems, email software screens incoming messages by organizing them into mailboxes and identifying junk mail. As a
    13·1 answer
  • If you want to open an application that does not have a tile pinned to the Start menu, _____ to find it in the list of installed
    7·1 answer
  • A program needs to allow a customer to input integers until the input number is zero. When the input number is zero, the program
    14·1 answer
  • Which one of the following items is an example of software?
    5·1 answer
  • Your organization has 20 employees who need an accounting software update installed. Due to a miscommunication, the purchaser on
    6·1 answer
  • Which of the following is NOT a function of a Web Browser?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!