Ad
  • Custom User Avatar
  • Custom User Avatar

    Amazing feeling when you crack it. Working down from 1000+ to 499 was really fun and challenging.
    It ignites the brain to think differently. Thanks for the KATA.

  • Custom User Avatar

    your text has to contain real newlines, not literally "\n" ("\" + "n") . The literal "\n"s in the assertion message are an artifact of the tests framework
    also : remember to specify which language you are using when you ask for help ;-)

  • Custom User Avatar

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

  • Custom User Avatar

    Sorry for not reviewing your wall of codem but 500+ successful python comlpletions suggests that the issue is in your code, not in the kata.

    I also updated the python version to 3.8, although again, that was most probably not your problem.

  • Custom User Avatar

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

  • Custom User Avatar

    "Indexerror: string index out of range."

    Well, that's very likely coming from your code, so that's not a kata issue.

    a few test cases yeilding incorrect answers

    Care to provide an example? As in, what the input is, what result you are getting, and what result the test is expecting (or assertion message). Make sure you're looking at the correct logs, which appear above the expected result. Also, saying that 10/100 tests are failing is almost irrelevant because random tests are RANDOM, and we can't see what inputs you're failing at.

    Please provide more concrete examples or this issue will be closed :/

    PS: read this FAQ if you're having problems troubleshooting your code.

  • Custom User Avatar

    That must be a miracle, would you like to show us your code?
    (with CORRECT MARKDOWN FORMATTING, please)

  • 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.