Hey everyone. I really need help with a question in Python. I have been trying for several days to figure this out. Any help will be much appreciated! Here is the question:

Body Mass Index (BMI) is a good indicator of boy fatness for most people. The formula for BMI is weight/height^2 where weight is in kilograms and height is in meters. Write a program that prompts for weight in pounds and height in inches, converts the values to metric, and then calculates and displays the BMI value.

I know what I have is absolutely wrong and I have no idea what to do for it. Here is what I have so far:

weight= input ("How much do you weigh (in pounds)?")

weight_in_kg= weight/2.2

height= input ("What is your height (in inches)?")

height_in_meters= height*2.54

bmi= weight_in_kg/(height_in_meters*2)

print (bmi)

I can't even get past the first step. I'm really sorry. And thank you so so much. You have no idea how much I appreciate it!

python.org tutorial is nice one to get you started http://docs.python.org/2/tutorial/index.html (also in IDLE help)

height_in_meters is not `height * 2.54` but `height * 0.0254` and you need two stars to raise to power.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.