''' Calculate the BMI of a person given their height and weight '''
def calcBMI( h, w ):
BMI = w / h**2
height = float(raw_input("Enter height in metres: "))
weight = float(raw_input("Enter weight in kilos: "))
BMI = calcBMI(height, weight)
print "BMI = %0.1f" % BMI
if BMI < 19:
print " You are currently underweight"
elif BMI >= 19:
print " You are in a healthy weight range"
elif BMI <= 25:
print "You are still in a healthy weight range"
elif BMI > 25:
print " You are now overweight. Please consider seeing your doctor"
elif BMI < 30:
print "You are in the overweight weight range. Please see your doctor"
elif BMI >= 30:
print " You are obese. Please make some changes and see your doctor"
print " Invalid selection"
This is question i was given
A BMI of less than 19 is considered underweight. A BMI between 19 and 25 inclusive is considered in the healthy weight range. A BMI above 25 but below 30 is considered overweight, while a BMI of 30 and above is considered obese.
Modify the program so that it prints out an appropriate health advisory.
Im just not getting the right advisory
Any help would be great