Ad
  • Custom User Avatar

    Yes, I got it.
    Thank you very much man

  • Custom User Avatar

    HA! that's a great question, and the answer is NOTHING: because the sample tests you showed are from some other kata, but the idea is the same. Anyway, the sample tests for this kata are:

    Test.describe("Basic tests")
    Test.assert_equals(bmi(50, 1.80), "Underweight")
    Test.assert_equals(bmi(80, 1.80), "Normal")
    Test.assert_equals(bmi(90, 1.80), "Overweight")
    Test.assert_equals(bmi(110, 1.80), "Obese")
    Test.assert_equals(bmi(50, 1.50), "Normal")
    

    ...so your function bmi() is passed two parameters and you should return a str as a result.

  • Custom User Avatar

    What does this have to do with "Calculate BMI"?

  • Custom User Avatar
    • test.assert_equals () makes a comparison of the two items passed into it
    • [- 1, -2, -3], [-4, -5, -6] is the given input for this test
    • array_plus_array() is the function you need to write
    • 21 is the expected return value for this test
    • so the tester compares the value your function returns to the expected value
  • Custom User Avatar

    What does this mean in the sample test?
    test.assert_equals (array_plus_array ([1, 2, 3], [4, 5, 6]), 21)
    test.assert_equals (array_plus_array ([- 1, -2, -3], [-4, -5, -6]), -21)
    test.assert_equals (array_plus_array ([0, 0, 0], [4, 5, 6]), 15)
    test.assert_equals (array_plus_array ([100, 200, 300], [400, 500, 600]), 2100)