Ad
  • Custom User Avatar
    1. A string is just a list of characters. For a 3kyu kata, surely you can handle lists and strings as arguments.
    2. Read the description. Until the very end.

    Not an issue.

  • Default User Avatar

    This kata's basic tests are incredibly inconsistent

    test.assert_equals( encode( fs, []), '')
    test.assert_equals( encode( [], "" ), None );
    test.assert_equals( encode( [('a', 1)], "" ), None );
    test.assert_equals( encode( [ ("a",4), ("b",1), ("c",2) ], "" ), "" )
    
    1. Why is it that we are testing enode(fs, []), when according to the hint the second argument should be a string ???

    takes: [ (str, int) ], str; returns: String (with "0" and "1")

    1. Why is encode(fs, "") supposed to return None if len(fs)<2 and else "" ????