[Tutor] BMI calc
Dave Angel
davea at davea.name
Wed Mar 13 08:10:40 CET 2013
On 03/13/2013 02:17 AM, Jos Kerc wrote:
> Hi,
>
>
> On Wed, Mar 13, 2013 at 4:07 AM, Soliman, Yasmin <ysoliman at uncc.edu> wrote:
>
>> <SNIP>
>>
>> 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'
It would certainly look prettier, but it's not a language requirement.
Only within a single block do the columns have to line up exactly.
> <SNIP>
--
DaveA
More information about the Tutor
mailing list