included the exception messages to return in the case of invalid parameter(s) (all three languages Python/JS/Ruby return the exact same error messages 'Invalid gender' / 'Invalid weight' / 'Invalid duration')
The description should specify in which order the exceptions are evaluated and what error messages should be used. In this case, gender is evaluated first, then weight, then duration.
Also, please stop complaining about kata ranks being off by one ( not you specifically, just everyone ). Changing ranks is expensive, not worth it, and not going to happen. Just enjoy the cheap points.
You don't actually need the else statement here.
If the first return statement runs, the function will be exited, and the second return statement will not run.
That said, I can see why you'd include the else statement for readability.
well done
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Python fork
Use spoiler flag next time, please.
This comment is hidden because it contains spoiler information about the solution
The description should specify in which order the exceptions are evaluated and what error messages should be used. In this case,
gender
is evaluated first, thenweight
, thenduration
.else is unnecessary here
That depends entirely on your language.
Also, please stop complaining about kata ranks being off by one ( not you specifically, just everyone ). Changing ranks is expensive, not worth it, and not going to happen. Just enjoy the cheap points.
Completely agree, I tend to use else for readability. Thanks for commenting!
You don't actually need the else statement here.
If the first return statement runs, the function will be exited, and the second return statement will not run.
That said, I can see why you'd include the else statement for readability.
its like the compound intrest formula
you have to iterate problem based on the weight you ger week by week
Having the same problem right now..
In the technical details section/paragraph there is a typo for the word formula. It is spelled "formulae" in the kata
Loading more items...