PY
py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
## by karima
## creat BMI calculator
print("welcome to BMI ")
height = float(input("how tall are you ? " ))
weight = int(input("what is your weight ? "))
BMI = weight/(height * height )
if BMI < 18.5 :
print(f"result is {BMI:.2f} BMI, you are underweight.")
elif 18.5 <= BMI <= 24.9 :
print(f" result is {BMI:.2f} BMI, you have a normal weight.")
elif 24.9 <= BMI <= 29.9 :
print(f" result is {BMI:.2f} BMI, you are overweight.")
else :
print(f" result is {BMI:.2f} BMI, you are obese.")
Enter to Rename, Shift+Enter to Preview
OUTPUT
Uruchom