Ad
  • Custom User Avatar

    Duplicate suggestion above

  • Default User Avatar

    If it requires a hint, so do all other katas.

  • Default User Avatar

    Indeed, especially

    The major complication is the value of both cars is decreasing (i.e. depreciating). They both decrease by the same percent per month, 1.5% for our first test. Additionally, the amount of depreciation increases by 0.5 percent every second month.

    is WAY more accurate. I'm filing an issue because "Furthermore the percent of loss" clearly implies that it only goes for the depreciation of the OLD car, not the new (that's a WIN, not a LOSS)

  • Custom User Avatar

    Not an issue.

  • Custom User Avatar

    codewars uses its own testing framework that's only vaguely related to how testing works in different languages

  • Default User Avatar

    In the unittest given, shouldn't assert_equals(a, b) be assertEqual(a, b) with Python??

    See [https://docs.python.org/3.6/library/unittest.html#assert-methods]

  • Default User Avatar

    It helped to skim over the discourse prior to attempting this Kata. In particular, the improved description provided by designerzim was comprehensive and cleared potential misunderstandings.

  • Default User Avatar

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

  • Custom User Avatar

    You're meant to return the value as a Bool and not a string. Remove the quotation marks and capitalise them.

    Boolean values have a signicant meaning and cannot be represented in strings in order to make them work. This is similar to numbers in programming: "5" and 5 are completely different things and are examples of polymorphism.

  • Default User Avatar

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

  • Custom User Avatar

    Hard to determine without seeing your code - post it as a reply to this comment and I can have a look for you.

  • Custom User Avatar

    √-1 = i

    i is a complex number. You cannot square root a negative number - otherwise it ends up being a complex number (imaginary). You must check if n >= 0

  • Default User Avatar

    My solution in Python 2 was not passing the tests for non-square numbers when using return 'false' , but it passed the tests with return 'true' with square numbers and all tests with random numbers.

    What was wrong?

  • Default User Avatar

    This kata raised my awareness of Python indentation to a new level.

  • Default User Avatar

    I ran your solution in both Python 2 and Python 3 here and no errors like the one you mentioned.
    Your solution is working just fine. Check your indentations and try again!

  • Loading more items...