python program to calculate body mass index of a person
Programming Example
Python program to calculate (BMI) body mass index of a person
Body Mass Index is a simple calculation using a person's height and weight. The formula is BMI=kg/m^2 where kg is a person's weight in kilogram and m^2 is the height in meter squared.
Solution
weight=float(input("Enter the weight of person in KG : ")) height=float(input("Enter the height of person in meter : ")) bmi=weight/(height*height) print("BMI of person is : ",bmi)
Output
Enter the weight of person in KG : 60
Enter the height of person in meter : 1.6
BMI of person is : 23.437499999999996