Write a program that will calculate BMI.
(bmi = weight (kg) : height(m) * height(m). bmi < 25 or bmi = 25 - there is no excess weight, and bmi > 25 - there is excess weight.)
def bmi_calculator (weight, height):
bmi = weight / (height ** 2)
if bmi < 25:
return "there is no excess weight"
if bmi >= 25:
return "there is excess weight"
import codewars_test as test
# TODO Write tests
import solution # or from solution import example
# test.assert_equals(actual, expected, [optional] message)
@test.describe("Example")
def test_group():
@test.it("test case")
def test_case():
test.assert_equals(bmi_calculator(75, 1.70),"there is excess weight")
test.assert_equals(bmi_calculator(55, 1.60),"there is no excess weight")
test.assert_equals(bmi_calculator(50, 1.75),"there is no excess weight")
test.assert_equals(bmi_calculator(100, 1.70),"there is excess weight")