Snippets

Kevin Pichette BMI Calculator

Created by Kevin Pichette
weight = int(input("Your weight in lbs: "))
height =int( input("Your height in inches: "))
bmi = weight / (height * height) * 703

answer = "Your BMI is: {} "
youAre = "Sorry, you are "

if bmi <= 18.5:
    category = "Underweight"
elif bmi > 18.5 and  bmi <= 24.9:
    category = "Normal range"
    youAre = "You are in the  "
elif bmi > 24.9 and bmi <= 29.9:
    category = "Overwieght"
elif bmi > 29.9:
    category = "Obese"

print(answer.format(round(bmi, 2)))
print(youAre + category)

Comments (0)

HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.