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](https://www.programmingempire.com/wp-content/uploads/2023/01/image-16.png)
Further Reading
Examples of OpenCV Library in Python
A Brief Introduction of Pandas Library in Python
A Brief Tutorial on NumPy in Python
- Angular
- ASP.NET
- C
- C#
- C++
- CSS
- Dot Net Framework
- HTML
- IoT
- Java
- JavaScript
- Kotlin
- PHP
- Power Bi
- Python
- Scratch 3.0
- TypeScript
- VB.NET
![programmingempire](https://www.programmingempire.com/wp-content/uploads/2021/10/pefavicon.png)