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.
you'll get there
a
suggestion
is a concrete proposition to improve a kata.regarding your message: the original point of this kata was to correct a very common programming mistake with the
switch
statement. As usual with bugfix katas, the Python translation completely missed the point of the kata, because Python has noswitch
and because scopes in Python work differently than in most other languages. As a result the Python version does not make much sense, and has little teaching valueI really think this one should be marked up as a 7 kata. It's pretty tricky... until you see the solution of course.
i thinŠ» auther wanted us to notice pattern.
Please use appropriate formatting when posting code. See https://docs.codewars.com/training/troubleshooting/#post-discourse.
Your code doesn't work, it computes the square of each number incorrectly. You also don't need to call your function yourself as the tests are responsible for that.
Seeing you're new to codewars, I recommend reading this article: https://docs.codewars.com/training/training-example/.