In Python Calculate the BMI of a person using the formula BMI = ( Weight in Pounds / ( ( Height in inches ) x ( Height in inches ) ) ) x 703 and assign the value to the variable bmi. Assume the value of the weight in pounds has already been assigned to the variable w and the value of the height in inches has been assigned to the variable h. Take care to use floating-point division.

Respuesta :

Answer:

weight_pounds=float(input("Enter the weight in pounds:\n"))#taking input of weight.

height_inches=float(input("Enter the height in inches:\n"))#taking input of thye height.

bmi=(weight_pounds/(height_inches**2))*703#calculating the bmi.

print('The body mass index is '+str(bmi))#printing the result.

Ouput:-

Enter the weight in pounds:

207.8

Enter the height in inches :

72

The body mass index is 28.163395061728398

Explanation:

The above written program is in python.First I have taken input from the user of the weight in pounds then taking input of the height in inches.Then calculating the bmi and storing it in the variable bmi.Then printing the bmi in the end.

ACCESS MORE