Ad
  • Custom User Avatar

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

  • Custom User Avatar

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

  • Custom User Avatar

    I'm really enjoying working on this kata but running into some issues that may be python version related?
    I'm using python 3.8 which I see is not an option here - only 3.6. I've copied and pasted all the test cases I can see and they all pass in pycharm and in pythontutor visualizer but every time I try to attempt here I run into 2 problems. An exit code 1. Usually "Indexerror: string index out of range." and a few test cases yeilding incorrect answers (even though they are correct offsite)
    In all my testing, even using the step by step visualizer there are no index issues that would affect the specific line of error and all tests I can replicate return the correct answers. I even went back through and added an absurd amount of checks to stop the program after almost every action that adds to an index.

    Incorrect outputs are reoccuring with the "aaaaaaaapasswordaaaaaaaa", 'it's a shift cypher!" and "javascript" (also one or two of the hiragana examples) - all of which pass correctly when tested outside of codewars.com

    Could this be because of the python version?
    At this point I have 114 pass 10 fail exit code 1 - all 10 fails work off this site.

  • Custom User Avatar

    I'm looking atht explination and just don't understand how it works. I'm going to have to study the wiki for this one as well.

  • Custom User Avatar

    yeah.. I'm looking at how this visually works step by step and I get it (which is good) but I would have NEVER thought to do it this way. I think my brain is still thinking of things in terms of brute force methods. My method loops around in a circle over and over until all list items are used up without ever repeating. This method is like flipping a switch. "add a line, delete the line, flip a switch(move everything), reverse it and repeat."

  • Custom User Avatar

    I'm having a lot of trouble with this one on python. The wiki on brainf*** helped me understand the process/movement of the commands but now I'm stumped with the actual input/output side of things. When the input is a string or a string + chr(#) it's characters are passed as a string automatically. My code, which is using integers (+/- 1) depending on the command, is running into type errors with strings/int/bytes. Am I looking to convert the input string to bytes and all of my +/-1 integers to bytes (like +chr(1)) and on the "." command convert it to string again? I tried string.encode() on the input - but then I'm dealing with another conversion. Same issue with bytes([#]) for converting the ints.
    In the first test the input is "Codewars"+chr(255) which shows as "Codewarsÿ". I believe the input code's commands should ultimately +1 so that the ÿ (chr(255)) becomes 0 so it completes as "Codewars" The closest I was able to get so far just adds a single space/character to the end of "Codewarsÿ" instead of altering it - but that eventually errors out anyway because of str-str/other type issues.

  • Custom User Avatar

    I also stored waaaaay too much data.. I spent way too much time on the math for this one too.