On Mon, Sep 24, 2012 at 7:25 PM, Dwight Hutto wrote:
> On Mon, Sep 24, 2012 at 7:13 PM, Alan Gauld wrote:
>> On 24/09/12 20:13, Aija Thompson wrote:
>>>
>>> Hi!
>>>
>>> So I've been working on this question for hours! And Python keeps giving
>>> me an error saying that my syntax for BMI is wrong.
On Mon, Sep 24, 2012 at 7:13 PM, Alan Gauld wrote:
> On 24/09/12 20:13, Aija Thompson wrote:
>>
>> Hi!
>>
>> So I've been working on this question for hours! And Python keeps giving
>> me an error saying that my syntax for BMI is wrong. I really can't
>> understand why.
>
>
I'd suggest an editor,
On 24/09/12 20:13, Aija Thompson wrote:
Hi!
So I've been working on this question for hours! And Python keeps giving
me an error saying that my syntax for BMI is wrong. I really can't
understand why.
So send us the full error text not a summary.
If Python reports a syntax its usually recorde
Aija Thompson wrote:
> Hi!
>
> So I've been working on this question for hours! And Python keeps giving me an
> error saying that my syntax for BMI is wrong. I really can't understand why.
>
> So this is what I have so far:
One suggestion: immediately convert to appropriate number type
instead
On Mon, Sep 24, 2012 at 3:13 PM, Aija Thompson wrote:
>
> ft, inches = h. split("'")
> h_sum = float(12*int(ft)) + (int(inches.strip('"'))
Leave h_sum as an int:
h_sum = 12 * int(ft) + int(inches.strip('"'))
A better name here would be "h_inch". Also, make sure your parentheses
are closed.
On Sep 24, 2012, at 3:16 PM, Aija Thompson wrote:
Hi!
So I've been working on this question for hours! And Python keeps giving me
an error saying that my syntax for BMI is wrong. I really can't understand
why.
So this is what I have so far:
w = raw_input('Please give your weight in lbs: ')
h
Hi!
So I've been working on this question for hours! And Python keeps giving me an
error saying that my syntax for BMI is wrong. I really can't understand why.
So this is what I have so far:
w = raw_input('Please give your weight in lbs: ')h = raw_input('Now your height
in feet and inches: ')h.