Articles

Python program to calculate body mass index

In this python programming article, we are going to learn

• python program to calculate body mass index

Python program to calculate bmi

The python program to calculate body mass index is as follows:

``````# Owner : TutorialsInhand Author : Devjeet Roy

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

bmi = 703 * weight/(height ** 2)

print("The BMI of the person is",round(bmi,2))``````

The output of the python program to calculate bmi is as follows:

``````PS C:\Users\DEVJEET\Desktop\tutorialsInHand> python code.py
The BMI of the person is 25.77``````

Few important tips about the program

1. Firstly we take the user's weight in lbs and height in inches. Thereafter we calculate the BMI.

2. The formula is BMI = (703 x weight) / height

Python program to calculate body mass index snapshot:

This completes our task to calculate bmi in python.

Basic Python Programs

Would you like to see your article here on tutorialsinhand. Join Write4Us program by tutorialsinhand.com