• Custom User Avatar

    ok

  • Custom User Avatar
        if len(observed) == 1:
            pass
    

    Why those lines? That's why your code fails the first sample test. Not a kata issue. Removed your other posts.

  • Custom User Avatar

    Please don't create 4 (!) separate messages for the same question, as it makes it hard for other users to reply in one place.

    Also the mods are going to tell you to remove Issue tag on both (!) of your messages, as there is no issue with the kata for the time being, you just have to troubleshoot your code.

    As for your problem, it's hard to say without seeing your code - if I had to guess, maybe you are iterating twice over a generator without realising it.

    Run the following in your IDE:

    gen = (x for x in range(5))
    print(max(gen))
    print(min(gen))
    

    and notice what happens when you try to make use of gen the second time.

    Now check your code for similar error - that you aren't making use of any generator twice before returning.

    Also, as usual - print the input just to make sure you understand which tests you are failing on.

  • Custom User Avatar

    And yeah, I am returning instead of printing, so why is it not working?

  • Custom User Avatar

    Traceback (most recent call last):
    File "tests.py", line 18, in
    test.assert_equals(sorted(get_pins(tup[0])), sorted(tup[1]), 'Come on, detective! You can do it better! These are not the PIN variations for "' + tup[0] + '"')
    TypeError: 'NoneType' object is not iterable

    Its also giving me this error for no reason. Can someone please help me?

  • Custom User Avatar
  • Custom User Avatar

    nobody can help you if you don't provide the language/failing test/code snippet

    if you are posting code, flag it as spoiler content

    if you want to see the input of the test, you can print it to the console

  • Custom User Avatar

    happening with me too lol idk whats wrong

  • Custom User Avatar

    can someone please help me out with my code, I am not understanding whats going worng with it and cant even see the type of tests being performed so i have no idea whats wrong with my code. Please