HealthCalculator.py - /usr/bin/env python 3...

This preview shows page 1 - 2 out of 2 pages.

#!/usr/bin/env python 3 # HealthCalculator.py # THis program will instruct the user enter in information such as weight # and height and will output their BMI # Your Name # 04/21/2021 # variables, weight, height, age , heart_rate, bmi weight = 0 age = 0 height = 0 heart_rate = 0 bmi = 0 # Calculate BMI def bmi_calculator(weight,height): bmi = weight/height if bmi < 18.5: print ("Your BMI is: ",round(bmi,2), " -- Underweight") elif bmi <= 24.9: print ("Your BMI is: ",round(bmi,2)," -- Normal weight") elif bmi <= 29.9: print ("Your BMI is:" ,round(bmi,2), " -- Overweight") else: print ("Your BMI is: " ,round(bmi,2)," -- Obese") return # Calculate max heart rate def max_heart(age,heart_rate):

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture