Skip to content

Commit 4a878aa

Browse files
Wojtek CichonWojtek Cichon
authored andcommitted
Adding BMI homework
1 parent 061bc70 commit 4a878aa

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

bmi.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
def compute_bmi(x, y):
2+
return x / (y**2)
3+
4+
5+
x = float(input("Your weight: "))
6+
y = float(input("Your height: "))
7+
8+
bmi = compute_bmi(x, y)
9+
bmi_rounded = round(bmi, 3)
10+
print(bmi_rounded)

0 commit comments

Comments
 (0)