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
Firdavs [7]
4 years ago
7

The following equations estimate the calories burned when exercising (source): Men: Calories = ( (Age x 0.2017) — (Weight x 0.09

036) + (Heart Rate x 0.6309) — 55.0969 ) x Time / 4.184 Women: Calories = ( (Age x 0.074) — (Weight x 0.05741) + (Heart Rate x 0.4472) — 20.4022 ) x Time / 4.184 Write a program using inputs age (years), weight (pounds), heart rate (beats per minute), and time (minutes), respectively. Output calories burned for men and women. Output each floating-point value with two digits after the decimal point, which can be achieved as follows: print('Men: {:.2f} calories'.format(calories_man))
Computers and Technology
1 answer:
sdas [7]4 years ago
8 0

Answer:

// program in Python.

#function to calaculate calories burned

def cal_burned(u_age, u_weight, heart_rate, time, gen):

   #variable

   cal = 0.0

   #for men

   if gen == 'm':

       cal = ((u_age * 0.2017) - (u_weight * 0.09036) + (heart_rate * 0.6309) - 55.0969) * time / 4.184

   #for women

   elif gen == 'f':

       cal = ((u_age * 0.074) - (u_weight * 0.05741) + (heart_rate * 0.4472) - 20.4022) * time / 4.184

#return calories burned

   return cal

#driver function

def main():

   #read age

   u_age=int(input('Enter age (years):'))

   #read weight

   u_weight=float(input('Enter weight (pounds):'))

   #read heart rate

   heart_rate=float(input('Enter heart rate (beats per minute):'))

   #read time

   time = int(input('Enter time (minutes):'))

#call function for Men

   calories_man=cal_burned(u_age,u_weight,heart_rate,time,'m')

#call function for women

   calories_women=cal_burned(u_age,u_weight,heart_rate,time,'f')

#print calories burned for Men

   print('Men: {:.2f} calories'.format(calories_man))

#print calories burned for women

   print('Men: {:.2f} calories'.format(calories_women))

#call main function

main()

Explanation:

Read age, weight, heart rate and time from user.Then call the function cal_burned() with all the input and a character parameter for men.This function will calculate  and return the total calories burned by the men.Similarly call the function again for women, Then it will return the calories burned by women.Print the calories burned by men and women.

Output:

Enter age (years):25                                                                                                      

Enter weight (pounds):180                                                                                                  

Enter heart rate (beats per minute):145                                                                                    

Enter time (minutes):50                                                                                                    

Men: 300.68 calories                                                                                                      

Men: 429.71 calories  

You might be interested in
Rae is building a website for the local chamber of commerce. this week, rae is designing and completing a page that contains a l
ValentinkaMS [17]
The first step is to Select the text.  Rae is building a website for the local chamber of commerce. this week, rae is designing and completing a page that contains a list, headings, body text, images, and a background. during this process, rae develops a style sheet , inserts appropriate images on the page, enhances the images for maximum effect, checks for non-web-safe colors, and removes any that she finds. to create an unordered list, the first step is to   Select the text.
5 0
3 years ago
Databases, authentication, and user accounts are all part of a website's ______________.
Varvara68 [4.7K]

Answer:

The answer is "Backend".

Explanation:

The Backend Development applies to just the webserver side when they concentrate mostly on how well the site functions. The website generally includes 3 sections consist of all this web design: a client, program, or server. The Backend user codes are the information provided by the database to both the web browser.

5 0
3 years ago
Who knows songs that are sad,happy,excited, and calm
anzhelika [568]

sad-

you broke me first

can we kiss forever

love the way you lie

happy-

Say Yes

Valerie

Walking on Sunshine

excited-

who let the dogs out

September

calm-

heather

put your records on

lonely

5 0
3 years ago
A.)navigate
Vaselesa [24]

Answer:

start with what you know

Explanation:

you can learn a lot from it

7 0
3 years ago
The most common cause of foodborne illness is
nignag [31]

Answer:

Food posioning

Explanation:

8 0
4 years ago
Read 2 more answers
Other questions:
  • To include an online picture in a publication, navigate to the _____ tab.
    7·1 answer
  • A neologism is defined as:
    5·1 answer
  • A user is troubleshooting a mobile device app that is displaying errors and has contacted the app manufacturer’s technical suppo
    14·1 answer
  • A Gym Masters system programmer has just installed the first Windows Server 2016 sys- tem and now needs to do an initial configu
    13·1 answer
  • A customer reports that recently several files cannot be accessed. The service technician decides to check the hard disk status
    11·1 answer
  • Please help ASAP, will mark brainliest!
    7·1 answer
  • Which of the following screen elements is a horizontal bar that displays at the
    8·1 answer
  • Explain the risks to privacy from collecting and storing personal data on computer systems and the programmer’s role to safeguar
    11·1 answer
  • Will creates an entry in his calendar and marks it as an all-day instance. Which item has he created?
    10·1 answer
  • What dictionary operation can you use to remove all the keys within the dictionary-named contacts?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!