Typescript: missing return type in solution setup ~~
Typescript 3.3 or above should be enabled
This comment is hidden because it contains spoiler information about the solution
nvm random tests are not required here
Why do we need so many (any) random test cases - here?
There are only 4 possible (valid) input states...
Are we testing for maliciously wilful coders? Is this best practice?
One problem with this approach (in general) is that the tester has to already have the answer (working code)...
It's good as a teaching mechanism I guess, but not always practical as a test strategy for real world code - or am I missing something?
I suppose, if you were updating code - say optimising an algorithm - you could use your old code and random tests to sanity check/validate your new code.
added for python
I've forked the Rust translation in order to update it to Rust 1.49 and updated rand::Rng::gen_range to its new signature that takes a std::ops::Range.
No random tests in some languages
Hi, first off: if you want to post your code you should use proper code markdown (otherwise indentation/readability is a problem), and thanks for using the spoiler tag.
As for the kata: the input() is not going to play a big role here on Codewars. The function get_drink_by_profession will be passed the parameter profession as a string and your function should figure out the correct response and then you return the string result instead of just print it.
you need to return the value, not print