You are on page 1of 1

height=float(input("Please enter height in cm:"))

weight=float(input('Please enter weight in kg:'))

BMI= weight/pow(height/100,2)
bmi= round(BMI,2)
print('Your BMI value is',bmi)

if bmi <= 18.5:


print("You are in the Underweight category")
elif 18.5<bmi<=24.9:
print("You are in the Normal Weight category")
elif 24.9<bmi<=29.9:
print("You are in the Overweight category")
else:
print("You are in the Obesity category")

print("\n")

user_input =str(input("Enter Q to end or any character to continue:"))

while user_input!='Q':
height=float(input("Please enter height in cm:"))
weight=float(input('Please enter weight in kg:'))

BMI= weight/pow(height/100,2)
bmi= round(BMI,2)
print('Your BMI value is',bmi)

if bmi <= 18.5:


print("You are in the Underweight category")
elif 18.5<bmi<=24.9:
print("You are in the Normal Weight category")
elif 24.9<bmi<=29.9:
print("You are in the Overweight category")
else:
print("You are in the Obesity category")

print("\n")

user_input =str(input("Enter Q to end or any character to continue:"))

You might also like