Calculate body mass index in python of a person


Write a program in python to calculate body mass index of a person?

Note:- (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. )

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("Body Mass Index of Person: ",bmi)

Output:- 

Enter the weight of person in kg: 50
Enter the height of person in meter: 1.5

Body Mass Index of Person:  22.22222222222222


Post a Comment

0 Comments