Ad
  • Custom User Avatar

    In this kata there is no function name for bash, you must just write the instruction to echo the expected result, assuming that the input is $1 (I agree this is a bad design, but one can find the same on some other katas...). I always had the impression shell set up was a bit awkward on Codewars. At least a single comment could be included in initial code giving basic indications. I agree this should be considered an issue, but actually I believe many shell katas would desserve to be revisited in the same sense.

  • Custom User Avatar

    The kata's description is shared amongst all languages and in most of them you need to write a function. If you think that bash instructions should be different, then create an issue.

  • Custom User Avatar

    Well, the docs are very clear when it comes to explaining the raise keyword. This is the standard, most acceptable way of reporting that something went wrong in the code. What would you suggest instead?

    I'm not trying to sound condescending (and I hope I'm not being toxic here!), but I don't understand how you could possibly use try here.

  • Custom User Avatar

    Searching for 'raising ValueError' and code skills previously learned lead people to try:/except: solutions.

    There's the official documentation you know...

  • Custom User Avatar

    (solved)hi! i ve same problem, i cant raise ValueError, try- except block for not raising error, i hope it does not ask we write something for error. anyone solved this issue?

  • Custom User Avatar

    but... what are the "another methods of raising ValueError"? You confused "raising an error" with "handling an error" - try:/except: is used to handle errors raised by someone, somewhere, and not to raise errors. The description asks users to raise an error and not to handle an error, and this should be enough of an explanation that try/except in your solution is not needed. How would I have to change the tests or description to help with such confusion?