Ad
  • Custom User Avatar

    actual and expected are swapped in PHP

  • Custom User Avatar

    Curious to know how people go about solving katas like this. I just try and identify some sort of formula through trial and error.
    I come up with a guess for a formula and test it with some inputs. I keep repeating until I hit something. This doesn't seem
    very efficient but not sure how else to solve problems like this...

  • Custom User Avatar

    Python: returning a wrong string breaks the solver in the random tests ;-)

    Unexpected exception raised
    Traceback (most recent call last):
      File "/workspace/default/src/codewars-test/codewars_test/test_framework.py", line 111, in wrapper
        func()
      File "tests.py", line 54, in example
        test.assert_equals(you, shift, f'...{Cipher(you).decode(inp)[y:y+100]}... should be in english' )
      File "tests.py", line 11, in __init__
        self.enc_key = str.maketrans(map2+map2.upper(), map1+map1.upper())
    ValueError: the first two maketrans arguments must have equal length
    
  • Custom User Avatar
  • Custom User Avatar

    what is appropriate?