We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1e1e250 commit 66e7a10Copy full SHA for 66e7a10
excercise_7.py
@@ -0,0 +1,17 @@
1
+# BMI Calculator
2
+weight = float(input("Enter your weight in kg: "))
3
+height = float(input("Enter your height in meters: "))
4
+
5
+bmi = weight / (height ** 2)
6
+print("BMI:", round(bmi, 2))
7
8
+if bmi < 18.5:
9
+ print(f"Your BMI is {round(bmi,2)} and you are underweight.")
10
+elif bmi < 25:
11
+ print(f"Your BMI is {round(bmi,2)} and you have a normal weight.")
12
+elif bmi < 30:
13
+ print(f"Your BMI is {round(bmi,2)} and you are overweight.")
14
+elif bmi < 35:
15
+ print(f"Your BMI is {round(bmi,2)} and you are obese.")
16
+else:
17
+ print(f"Your BMI is {round(bmi,2)} and you are clinically obese.")
0 commit comments