[Tutor] BMI Question

Aija Thompson aijathompson at hotmail.com
Mon Sep 24 21:13:15 CEST 2012

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. split("'")ft, inches = h. split("'")h_sum = float(12*int(ft)) + (int(inches.strip('"'))BMI = float(703*w)/float(h_sum*h_sum)print 'Your BMI is: ', BMI
It's the first BMI that isn't agreeing with Python. Any help would do!
Also, if there are any other serious problems, maybe you could let me know. I'm still having some trouble learning all of this. 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20120924/38eb428f/attachment.html>

More information about the Tutor mailing list