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
Using your idea about how to solve this DUI problem, list two actions you can take that will make more people aware of this issu
s2008m [1.1K]
Drunk driving seems to be a big problem with teens because they are usually not experienced in driving. Once they drink and drive they have a false sense of invincibility and make poor decisions behind the wheel. In order to keep the numbers of drunk teen crashes declining, there should be testimonial videos of the people that have been affected by drunk drivers.

Another idea is, one group trying to end drunk driving. It's mission is to end drunk driving, help fight drugged driving, support the victims of these violent crimes, and prevent underage drinking.

Hope I helped !!!!^_~!!!
8 0
4 years ago
Used prevalently on the web, it allows for secure messages to be sent between parties without having to agree on, or share, a se
Sati [7]

Answer: A- Public Key Encryption

Explanation: The Public key Encryption is used prevalently on the web, it allows for secure messages to be sent between parties without having to agree on, or share, a secret key. It uses an asymmetric encryption scheme in which the encryption key is made public, but the decryption key is kept private.

7 0
4 years ago
Read 2 more answers
__________ is the brain of a computer.<br><br> A. Hardware<br> B. CPU<br> C. Memory<br> D. Disk
iren [92.7K]

Answer:

The CPU is the brain of a computer

8 0
3 years ago
Read 2 more answers
Plzzzz help me
Art [367]

Answer:

Answered below

Explanation:

Carpal tunnel syndrome is a disease which occur as a result of pressure on the median nerve supplying the hand. The median nerve passes under the carpal tunnel, which is a band of tendons at the wrist, and gets compressed.

Causes include;

Excessive, prolonged, repetitive typing, diabetes, obesity, arthritis.

Symptoms include;

Numbness of the hand, weakness of the hand, inability to grasp, tingling sensations on the parts of the hand affected.

6 0
3 years ago
. A search engine is a way to
Sindrei [870]
<span>Option A, the search engine is the way to get information on the internet through a web browser, installed on an operating system of a computer. It is software that gathers all the information and stores it to accelerate the search for the users by entering the data of the desired information.</span>
8 0
4 years ago
Read 2 more answers
Other questions:
  • What helps in determining the reliability of a person to repay debt?
    12·2 answers
  • You begin your first day of responsibilities by examining the recent IS security breach at GearUp to get ideas for safeguards yo
    11·1 answer
  • "which programming language is used within html documents to trigger interactive features?"
    10·1 answer
  • What should you remember about typography while creating your résumé?​
    14·1 answer
  • 3.3 Code Practice: Question 1
    6·1 answer
  • In this lab, you declare and initialize variables in a Java program. The program file named NewAge.java, calculates your age in
    14·1 answer
  • What is the feature of ram for beginners
    5·2 answers
  • HELP!!!<br> THIS HAPPENS EVERY TIME
    6·2 answers
  • Write a c++ program which has array in fifteen element sort the array by selection the search for in element using binary search
    14·1 answer
  • Why is computer called information processing machine ?????​
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!