# This program computes a person's basal metabolic rate (BMR). # Initial unstructured version that processes just one person. def main(): # prompt for one person's information print("Enter person 1 information:") height1 = float(input("height (in inches)? ")) weight1 = float(input("weight (in pounds)? ")) age1 = float(input("age (in years)? ")) sex1 = input("sex (male or female)? ") print() # calculate the person's BMR bmr1 = 4.54545 * weight1 + 15.875 * height1 - 5 * age1 if sex1.lower() == "male": bmr1 += 5 else: bmr1 -= 161 print("Person #1 basal metabolic rate =", round(bmr1, 1)) # print person's resting burn rate if bmr1 < 1200: print("low resting burn rate"); elif bmr1 <= 2000: print("moderate resting burn rate") else: # bmr1 > 2000 print("high resting burn rate") main()