Answer:
# 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
#main function to gets input for age, weight, hear rate and time and print Women and Man calorie burnt
def main():
#get user input for age, weight, hear rate and time
age = int(input("Enter your age:"))
weight = int(input("Enter your weight:"))
heartRate = int(input("Enter your heart rate:"))
time = int(input("Enter your time:"))
#calculate calories for women and men
caloriesWomen = ((age * 0.074) - (weight * 0.05741) + (heartRate * 0.4472) - 20.4022) * time / 4.184
caloriesMen = ((age * 0.2017) + (weight * 0.09036) + (heartRate * 0.6309) - 55.0969) * time / 4.184
#print calories for women and men
print("Women: %.2f calories"%caloriesWomen)
print("Men: %.2f calories"%caloriesMen)
#calling main function
main()
Step-by-step explanation:
1) Above is your updated program.
2) Please copy it in python file and run
3) Below is the test output for this program
Enter your age:49
Enter your weight:155
Enter your heart rate:148
Enter your time:60
Women: 580.94 calories
Men: 891.47 calories