Title | IT 140 Module (1) Zybook 1-22 LAB- Expression for calories burned during workout |
---|---|
Author | Jay Cam |
Course | Intro To Scripting |
Institution | Southern New Hampshire University |
Pages | 3 |
File Size | 193.8 KB |
File Type | |
Total Downloads | 71 |
Total Views | 133 |
A walk through for the chapter One. It has details on what to do with the codes....
Code:
''' Calories = ((Age x 0.2757) + (Weight x 0.03295) + (Heart Rate x 1.0781) — 75.4991) x Time / 8.368 '''
''' Type your code here. '''
age_years = float(input()) weight_lbs = float(input()) heart_rate = float(input()) time_min = float(input())
men_calories = ((age_years * 0.2017) - (weight_lbs * 0.09036) + (heart_rate * 0.6309) - 55.0969) * (time_min / 4.184) women_calories = ((age_years * 0.074) - (weight_lbs * 0.05741) + (heart_rate * 0.4472) - 20.4022) * (time_min / 4.184)
print("women:", women_calories) print("men:", men_calories)
Input: 49 155 148 60...