-
Notifications
You must be signed in to change notification settings - Fork 0
/
BMI Calculator.py
76 lines (42 loc) · 1.19 KB
/
BMI Calculator.py
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/usr/bin/env python
# coding: utf-8
# In[15]:
name = input("Enter your name")
weight = int(input("Enter your weight in pounds: "))
height = int(input("Enter your height in inches: "))
BMI = (weight * 703) / (height * height)
print(BMI)
if BMI>0:
if (BMI<18.5):
print(name +", you are underweight")
elif (BMI<=24.9):
print(name +", you are normal weight")
elif (BMI<29.9):
print(name +", you are overweight")
elif (BMI<34.9):
print(name +", you are obese")
elif (BMI<39.9):
print(name +", you are severely obese")
else:
print(name +", you are morbidly obese")
else:
print("Enter valid input")
# In[ ]:
# In[ ]:
#BMI = (weight in pounds x 703) / (height in inches x height in inches)
# In[ ]:
# In[13]:
if BMI>0:
if (BMI<18.5):
print(name +", you are underweight")
elif (BMI<=24.9):
print(name +", you are normal weight")
elif (BMI<29.9):
print(name +", you are overweight")
elif (BMI<34.9):
print(name +", you are obese")
elif (BMI<39.9):
print(name +", you are severely obese")
else:
print(name +", you are morbidly obese")
# In[ ]: