tests
This commit is contained in:
parent
f92f5ef7f6
commit
307c51539c
10 changed files with 252 additions and 1 deletions
19
test/ruby/25.in
Normal file
19
test/ruby/25.in
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
# test_arithmetic.py
|
||||
def calculate_bmi(weight, height):
|
||||
bmi = weight / (height ** 2)
|
||||
|
||||
if bmi < 18.5:
|
||||
category = "Underweight"
|
||||
elif bmi < 25:
|
||||
category = "Normal"
|
||||
elif bmi < 30:
|
||||
category = "Overweight"
|
||||
else:
|
||||
category = "Obese"
|
||||
|
||||
return f"BMI: {bmi}, Category: {category}"
|
||||
|
||||
# Test
|
||||
print(calculate_bmi(70, 1.75))
|
||||
print(calculate_bmi(90, 1.80))
|
||||
print(calculate_bmi(50, 1.65))
|
||||
Loading…
Add table
Add a link
Reference in a new issue