[Tutor] BMI calc
Jos Kerc
joskerc at gmail.com
Wed Mar 13 07:17:47 CET 2013
Hi,
On Wed, Mar 13, 2013 at 4:07 AM, Soliman, Yasmin <ysoliman at uncc.edu> wrote:
> I'm using python 2.7, where exactly does the return statment with the
> (return (weight/(height*height))*703 calculation get posted in the function?
>
> def calc_BMI(weight,height):
> if bmi <=18.5:
> return 'underweight'
> elif bmi >= 18.5 and bmi <=24.9:
> return 'normal weight'
> elif bmi >=25 and bmi <=29.9:
>
Following return is out of alignment. Should be at the same place in the
line as the oters.
> return 'overweight'
> elif bmi >=30:
> return 'obese'
>
> The user will need to input height ex) 5'3 and which will need to be split
> and stripped in order to convert to inches.
>
Exactly. Do you have a problem with this? If so what?
Dreetz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20130313/cca73f99/attachment.html>
More information about the Tutor
mailing list