-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path23. Exercise-4 - BMI Indicator.py
More file actions
35 lines (28 loc) · 1006 Bytes
/
Copy path23. Exercise-4 - BMI Indicator.py
File metadata and controls
35 lines (28 loc) · 1006 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
"""
WAP to indicate users whether they are healthy or not based on their BMI value.
"""
weight = float(input("Enter your weight in kgs : "))
height = int(input("Enter your height in cms : "))
BMI = float(weight/((height/100)**2))
BMI = round(BMI, 1)
print()
if BMI < 18.5:
print(f"Your BMI is {BMI}, so you are underweight.")
elif BMI >= 18.5 and BMI < 24.9:
print(f"Your BMI is {BMI}, so you are healthy.")
elif BMI >= 25 and BMI < 29.9:
print(f"Your BMI is {BMI}, so you are overweight!")
elif BMI >= 30 and BMI < 40:
print(f"Your BMI is {BMI}, so you fall into Obese category!!")
else:
print(f"Your BMI is {BMI}, so you fall into severe obesity category!!!")
print()
print("Being healthy is primary, everything rest comes after and over it.")
print()
"""
SAMPLE OUTPUT -
Enter your weight in kgs : 55
Enter your height in cms : 170
Your BMI is 19.0, so you are healthy.
Being healthy is primary, everything rest comes after and over it.
"""