Ad
  • Custom User Avatar

    removed from CoffeeScript and from the description. Clojure did not have them, and the remaining languages are statically typed.

  • Custom User Avatar

    fixed + enabled JUnit5 + changed the method signature to return a primitive boolean instead of a wrapped Boolean

  • Custom User Avatar

    Removed in python.

  • Custom User Avatar

    added + chai assertions + removed non-integer inputs

  • Custom User Avatar

    From looking at the linked Wikipedia article, I believe this line, and the associated diagram, is not correct:

    "For example, 6 is a triangle number because you can arrange 6 objects into an equilateral triangle:"

    The reason 6 is a triangle number is because you can arrange 3 numbers in a triangle, 1, 2, and 3, and their total is 6.

  • Custom User Avatar

    (note that any non-integers, including non-number types, are not triangle numbers).

    Mindless input validation is against the authoring guidelines, and the kata has already been translated to statically-typed languages where it does not apply. Tests should only pass positive integers.

    Already removed in Ruby, JavaScript

  • Custom User Avatar

    Removed bools. (Sadly expecting True invalidates most solutions.)

  • Custom User Avatar

    note that any non-integers, including non-number types, are not triangle numbers

    In Python, bool is an integer type:

    isinstance(True, int) => True
    

    I think that tests using bool should either expect True, or be removed for this language.

  • Custom User Avatar
  • Custom User Avatar

    Looks good.

    Can you also add a return / pass statement in the initial solution function so it will not throw an error when executed?

    def trace(matrix):
        # Your code here
        return 
    
  • Custom User Avatar

    Test framework update

    Old test framework was only used in sample tests btw. I mostly just copied fixed tests there.

  • Custom User Avatar

    Test framework update

  • Custom User Avatar

    Done. Changed to:

    test.assert_equals(num_to_russian("1000"), "тысяча")
    
  • Custom User Avatar
    1. Если уж тебе так нравится эта идея, я готов сделать и казахскую версию.

    2. До этого (насколько я знаю), не было ни одной задачи на CodeWars в роде "переведи строку на {любой язык кроме английского} на число.". И да, я добавил слой сложности, с конвертированием числа в русскую строку. Не надо это упоминать.

    3. Русская этимология отличается от этимологий многих других индо-европейских языков, поэтому это - новый опыт для носителей иностранных языков.

  • Custom User Avatar

    This test is incorrect from grammar perspective:

    test.assert_equals(num_to_russian('1000'), "тысяч")
    

    In Russian, тысяча is short for одна тысяча. Just as with одна целая, when talking about one of something, you have to consider gender. Interestingly, 1 000 is feminine, 1 000 000, 1 000 000 000 and onwards are masculine.

    Acceptable versions:

    test.assert_equals(num_to_russian('1000'), "одна тысяча")
    test.assert_equals(num_to_russian('1000'), "тысяча")
    
  • Loading more items...