Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
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.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.
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.There's the official documentation you know...
(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?
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 thattry/except
in your solution is not needed. How would I have to change the tests or description to help with such confusion?