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
Enter your weight(lbs): 190
Enter your height(in): 72
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) / height2
Python program to calculate body mass index snapshot:
This completes our task to calculate bmi in python.
Would you like to see your article here on tutorialsinhand.
Join
Write4Us program by tutorialsinhand.com
About the Author
Devjeet Roy
Full Stack Web Developer & Blockchain Enthusiast
Page Views :
Published Date :
Aug 26,2021