>> Yes, you are right, of course.
>> Thanks for reminding me that we are dealing with floats.
>> I should have used approximations, with an (epsilon) error range.
>> I will remember if future, I hope.
>
> The solution I had in mind is simpler:
>
> if bmi < 18.5:
> print "underweight"
> elif b
Shall, Sydney wrote:
> On 13/03/2013 12:21, Peter Otten wrote:
>> Shall, Sydney wrote:
>>
>>> I am also a newbie, but I wish to learn, so I offer the following
>>> corrections.
>>> # Note. I do note know what units you are using.
>>> # I would use scientific, metric units. So you need to divide bo
On 13/03/2013 12:21, Peter Otten wrote:
Shall, Sydney wrote:
I am also a newbie, but I wish to learn, so I offer the following
corrections.
# Note. I do note know what units you are using.
# I would use scientific, metric units. So you need to divide both
weight and height by a suitable convers
Shall, Sydney wrote:
> I am also a newbie, but I wish to learn, so I offer the following
> corrections.
> # Note. I do note know what units you are using.
> # I would use scientific, metric units. So you need to divide both
> weight and height by a suitable conversion factors.
> # Then you will
@python.org
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Tutor digest..."
--Forwarded Message Attachment--
From: ysoli...@uncc.edu
To: breamore...@yahoo.co.uk; tutor@python.org
Date: Wed, 13 Mar 2013 03:07:27 +
Subject: Re: [Tutor] BMI calc
I
On 13/03/2013 00:05, Soliman, Yasmin wrote:
Hello all,
I'm new to python and its been a stuggle so far. I'm attempting to create a BMI
calculator in Wing 101 4.1. I keep getting syntax errors:
def calc_BMI(weight,height):
return (weight/(height*height))*703.0
if bmi <=18.5:
print 'u
On 13/03/2013 00:05, Soliman, Yasmin wrote:
Hello all,
I'm new to python and its been a stuggle so far. I'm attempting to create a BMI
calculator in Wing 101 4.1. I keep getting syntax errors:
def calc_BMI(weight,height):
return (weight/(height*height))*703.0
if bmi <=18.5:
print 'un
On 13/03/13 03:07, Soliman, Yasmin wrote:
I'm using python 2.7,
Then let us see the syntax errors because otherwise we are guessing.
> where exactly does the return statment ... get posted in the function?
I'm not sure what you mean by 'get posted'
It is activated once the function is called.
On 03/13/2013 02:17 AM, Jos Kerc wrote:
Hi,
On Wed, Mar 13, 2013 at 4:07 AM, Soliman, Yasmin wrote:
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:
F
Hi,
On Wed, Mar 13, 2013 at 4:07 AM, Soliman, Yasmin 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'
From: Tutor [tutor-bounces+ysoliman=uncc@python.org] on behalf of Mark
Lawrence [breamore...@yahoo.co.uk]
Sent: Tuesday, March 12, 2013 10:29 PM
To: tutor@python.org
Subject: Re: [Tutor] BMI calc
On 13/03/2013 02:08, Dave Angel wrote:
> On 03/12/2013
On 13/03/2013 02:08, Dave Angel wrote:
On 03/12/2013 09:46 PM, Mark Lawrence wrote:
On 13/03/2013 00:05, Soliman, Yasmin wrote:
Hello all,
I'm new to python and its been a stuggle so far. I'm attempting to
create a BMI calculator in Wing 101 4.1. I keep getting syntax errors:
def calc_BMI(wei
On 03/12/2013 09:46 PM, Mark Lawrence wrote:
On 13/03/2013 00:05, Soliman, Yasmin wrote:
Hello all,
I'm new to python and its been a stuggle so far. I'm attempting to
create a BMI calculator in Wing 101 4.1. I keep getting syntax errors:
def calc_BMI(weight,height):
return (weight/(height
On 13/03/2013 00:05, Soliman, Yasmin wrote:
Hello all,
I'm new to python and its been a stuggle so far. I'm attempting to create a BMI
calculator in Wing 101 4.1. I keep getting syntax errors:
def calc_BMI(weight,height):
return (weight/(height*height))*703.0
if bmi <=18.5:
print 'un
Hello all,
I'm new to python and its been a stuggle so far. I'm attempting to create a BMI
calculator in Wing 101 4.1. I keep getting syntax errors:
def calc_BMI(weight,height):
return (weight/(height*height))*703.0
if bmi <=18.5:
print 'underweight'
elif bmi >= 18.5 and bmi <=24.9:
15 matches
Mail list logo