Ad
  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    it does not impact performance. however, as you can see for yourself, the arrow syntax introduced in ES6 allows for more concise code, which is why it has become very popular among devs. although you don't need to type out the function keyword in codewars since it's already there, people still like to change the declaration into arrow syntax as it reflects a modern mindset (and also your code is more likely to be separate from a lot of other solutions if you do it differently xD)

  • Custom User Avatar

    why does this work?

  • Custom User Avatar

    this works if a==b since margin >= 0, however it is better not to implement a sgn function this way since it can cause ZeroDivisionError under different circumstances

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    Since A>=0 and B>=0, the text should be changed to "The numbers in the expression will always be non-negative"

  • Custom User Avatar

    They aren't. You have to make such a dataset (list/set/dictionary etc.) yourself.

  • Custom User Avatar

    Kyu is the ranking system of users as well as the difficulty level for kata in codewars. New users start at 8 kyu and gradually go up as they complete more kata. Kata are tagged with difficulty levels also measured in kyu (the easiests marked 8 kyu), which can help users decide whether a kata is too difficult, too easy or the right level for them. Usually kata of 8 and 7 kyu difficulties are considered beginner level kata, they are relatively easy.

  • Custom User Avatar

    Apparently it did show an error but looks like the solution was submitted nonetheless. Must have been a temporary server error or something>
    Thank you for your reply

  • Custom User Avatar

    I cannot submit my solution. It seems to work perfectly, passes all tests, but when I click Submit it says "There was an issue submitting your solution". Other kata are being submitted normally though

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution