Question: Python: The following equations estimate the calories burned when exercising: Women: Calories = ( (Age x 0.074) (Weight x 0.05741) + (Heart Rate x 0.4472)
Python: The following equations estimate the calories burned when exercising: Women: Calories = ( (Age x 0.074) (Weight x 0.05741) + (Heart Rate x 0.4472) 20.4022 ) x Time / 4.184 Men: Calories = ( (Age x 0.2017) + (Weight x 0.09036) + (Heart Rate x 0.6309) 55.0969 ) x Time / 4.184 Write a function named calories_burned_woman that accepts her age (years), weight (pounds), heart rate (beats per minute), and time (minutes) as arguments. The function should return the number of calories burned. Write a function named calories_burned_man that accepts her age (years), weight (pounds), heart rate (beats per minute), and time (minutes) as arguments. The function should return the number of calories burned. Write a program that prompts the user to input their age, weight, heart rate, and time as ints, respectively. Call the women_calories and men_calories functions and outputs the number of calories burned with 2 digits to the right of the decimal place for women and men.
When prompting the user you must always include text which lets the user know what should be inputted. The following equations estimate the calories burned when exercising: Women: Calories = ((Age x 0.074) (Weight x 0.05741) + (Heart Rate x 0.4472) 20.4022) x Time / 4.184 Men: Calories = ((Age x 0.2017) + (Weight x 0.09036) + (Heart Rate x 0.6309) 55.0969 ) x Time / 4.184 Write a function named calories burned_woman that accepts her age (years), weight (pounds), heart rate (beats per minute), and time (minutes) as arguments. The function should return the number of calories burned. Write a function named calories burned_man that accepts her age (years), weight (pounds), heart rate (beats per minute), and time (minutes) as arguments. The function should return the number of calories burned. Write a program that prompts the user to input their age, weight, heart rate, and time as ints, respectively. Call the women_calories and men_calories functions and outputs the number of calories burned with 2 digits to the right of the decimal place for women and men. Example program run: Enter your age: 25 Enter your weight: 130 Enter your beats per minute: 120 Enter the number of minutes you exercised: 45 A woman would burn 297.37 calories A man would burn 402.25 calories
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
