On Sep 24, 2012, at 3:16 PM, Aija Thompson <aijathomp...@hotmail.com> 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 = raw_input('Now your height in feet and inches: ') h. split("'") ^^^^^ This doesn't seem necessary. ft, inches = h. split("'") h_sum = float(12*int(ft)) + (int(inches.strip('"')) ^^^^^ You have three opening parents on this line and only two closing parens. 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. Thanks! _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor