Ad
  • Default User Avatar

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

  • Default User Avatar

    Ah should have looked at the test cases a bit more thoroughly. Thank you

  • Default User Avatar

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

  • Default User Avatar

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

  • Default User Avatar

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

  • Default User Avatar

    In the example QRCode, it goes from black -> black -> white..
    Also, dont you need to know the color of the field to determine if it will be a 0 or 1? If field is black and x+y%2 is 0 -> add 0. If not, add 1. z

  • Default User Avatar

    Hello, can someone help me understand the question a bit better..

    We start with the first pixel (in the lower right corner, where also the red arrow begins) which is black, but we have to use mask because (20+20)%2 is 0, therefore we don't add 1 to our bit sequence but 0.
    Next field is white. This time we don't use mask because (20+19)%2 isn't 0, so we add a 0 to our bit sequence.
    Next field is black. This time we don't use mask because (19+20)%2 isn't 0, so we add a 1 to our bit sequence.
    

    How do you know if the field is white or black?

  • Default User Avatar

    The init in all som cases are set to the number 0
    Please fix this in test cases. Its 0 instead of a[0] or whatever its supposed to be..

    Reducing by steps
    basic tests gcdi, lcmu, som, mini, maxi (16 of 20 Assertions)
    Completed in 0.35ms
    Reducing by steps
    Random Tests som (0 of 100 Assertions)
    Random Tests maxi (100 of 100 Assertions)
    Random Tests gcdi (100 of 100 Assertions)
    Random Tests lcmu (100 of 100 Assertions)
    
  • Default User Avatar

    can anyone tell me what formula to look up to solve this lol i am terrible at math

  • Default User Avatar

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

  • Default User Avatar

    Im getting this error with python when i havent even written any code.

    Traceback (most recent call last):
    File "main.py", line 3, in
    Test.assert_equals(sorted(two_sum([1,2,3], 4)), [0,2])
    TypeError: 'NoneType' object is not iterable

    def two_sum(numbers, target):
        pass
    
  • Default User Avatar

    Getting this error for python

    Traceback (most recent call last):
    File "main.py", line 2, in
    import codewars_test as test
    ModuleNotFoundError: No module named 'codewars_test'

  • Default User Avatar

    Ah ok nvm i got it.. Idk why i was using and instead of or lol.
    Thank you!

  • Default User Avatar

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

  • Default User Avatar

    Hello, would be greatly appreciated if someone can explain this kata a bit more thoroughly

  • Loading more items...