Ad
  • Custom User Avatar

    Im so sorry because Im newbie. How can i delete my comment/feedback? I tried to delete it.

  • Custom User Avatar
    • Done for python
    • added random and sample tests in java (edit: commented out the random tests, something seems wrong, but I couldn't spot quickly what it was. And I don't wanna dig into the ref soltuion...)
  • Default User Avatar

    In your example, ["aa"] is not an object for applying the :add method, but an array of arguments for the :add method, so you don't need to apply the :add method to ["aa"], but you need to apply the :add method with all the arguments from [ "aa"](that is, here with one argument "aa") to all objects of a some class(this class already has a :add method) from the array from which the invoke method is called.
    An example from the description can be used as a test. In it, items=[ExampleItem.new, nil, ExampleItem.new] is an array of objects from which the invoke method is called, which must be added to the Array class so that it calls the passed method (for example: add) with arguments for each element of the array (here items) if the condition from the block for this element is met.

  • Custom User Avatar

    Not a kata issue, why are you returning false in your if?

  • Custom User Avatar

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

  • Default User Avatar

    I think, the task is too easy as for 4 kyu (at least on JavaScript). What is only needed is implemention of simple algorithm which is mostly described in the description.

  • Custom User Avatar
  • Custom User Avatar

    do not post solutions in discourse, also not a kata suggestion!!!

  • Default User Avatar

    Tu funcion necesita tener el mismo nombre que la del ejemplo, tambien la clase

    Osea, la clase debe llamarse "RomanNumerals"

    La funcion de Numero a romano debe llamarse "to_roman"

    La funcion de Romano a numero debe llamarse "from_roman"

    Tambien, las funciones deben estar dentro de la clase RomanNumerals, pues el kata las llamara como "RomanNumerals.to_roman", es decir, si la funcion no esta dentro de la clase, no la va a encontrar

  • Default User Avatar

    It is not possible to write the same letter 4 times in a row in the roman System:

    For example, the roman representation of 4 is IV, insetad of IIII
    In these cases, the letter on the left subtracts its value from the letter on the right
    In IV, V is 5, I is 1, so 5 - 1 = 4:

    In 1990, we use MCMXC instead of MDCCCCLXXXX for the following reasons:

    M is 1000, so far so good

    To represent 900, we use CM, since C is 100 and M is 1000, so 1000 - 100 = 900

    Same goes for 90, C is 100, X is 10, so 100 - 10 = 90

    Hope this helps!

  • Custom User Avatar

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

  • Custom User Avatar

    for some reason when I type the characters do don't show. Anyone else have this issue?

  • Custom User Avatar

    Remember snake_case!

  • Custom User Avatar

    Mark your post as having spoiler content next time, and please don't post solutions in discourse.

  • Default User Avatar

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

  • Loading more items...