30.5k views
1 vote
Make a Python program to calculate a user's Body Mass Index. Use the console to ask their name, weight in lbs, and their height in feet and inches. You can use two variables to represent height if this makes it easier: one for inches, and one for feet. Use this data to calculate the users BMI using the formula: BMI

User Kadie
by
5.3k points

1 Answer

6 votes

Answer:

Answered below

Step-by-step explanation:

weight = float(input("Enter weight in lbs: "))

height_in_feet = float(input ("Enter height in feet: "))

height_in_inches = float(input("Enter height in inches: "))

total_height = height_in_feet + (height_in_inches * 0.0833)

weight_in_kg = weight * 0.454

bmi = weight_in_kg/ (total_height ** 2)

print (bmi)

User Robocab
by
6.0k points