The following code example demonstrates how to Create a Program in Python to Compute BMI.

Basically, the following program demonstrates the use of if..elif..else ladder.

# programmingempire.com

weight = eval(input("Enter weight in Kilograms"))
height = eval(input("Enter height in meter"))
bmi = weight/(height*height)
print("BMI is", bmi)
if bmi <18.5:
    print("Underweight")
elif bmi <25:
    print("Normal")
elif bmi <30:
    print("OverWeight")
else:
    print("Obese")

Output

Demonstrating How to Create a Program in Python to Compute BMI
Demonstrating How to Create a Program in Python to Compute BMI

Further Reading

Python Practice Exercise

Examples of OpenCV Library in Python

Examples of Tuples in Python

Python List Practice Exercise

A Brief Introduction of Pandas Library in Python

A Brief Tutorial on NumPy in Python

programmingempire

princites.com

IITM Software Development Cell