Ad
  • Default User Avatar

    When I look at your code the first thought I think is "Where's indentation?"

  • Custom User Avatar

    You're running into difficulty here because the result of each call to the function must itself be callable (so you can chain another function call), while at the same time also being a legitimate string (in case you don't chain another function call and just use the return value as-is).

  • Custom User Avatar

    It's not 'some crap', it is exactly what it says. Your function returns nothing (None), so if the test is add(1)(2), add(1) returns None, and then it attempts to call None(2), which won't work.

    Not a kata issue, but a problem with your code.

  • Default User Avatar

    Изпользуй утверждение, что наименьший делить составного числа не более корня этого числа. Пропиши данное условие и время на проверку огромных чисел сократится в огромнократно.

  • Custom User Avatar

    https://docs.codewars.com/references/markdown#images You need to upload your image to some free host, so it's better to simply post your code instead
    https://docs.codewars.com/training/troubleshooting#post-discourse

  • Custom User Avatar

    please read and test BEFORE marking resolved

    There is nothing to test. Every print WILL show up, on all katas, unless it's been explicitly disabled (IDK if possible). The only reason to see no logs is that you're returning before print statement, or an exception is raised (but even then I think all logs show up before the exception is raised).

    If you want to be really sure, you can add another argument to print: print(... , flush=True) (usually used if your code is timing out)

    If it's still not showing up, feel free to post a screenshot or something like that.

  • Custom User Avatar

    Empty string is not printed, try print("Input: '" + string + "'") I don't see anything that could make the should handle letter cases work any different. And instead of a wild-goose chase, why don't you show your code? The screenshot isn't there. That way we can know for sure what's wrong with it.

  • Custom User Avatar

    @CrashOverride1987

    Do an experiment. Comment out your entire solution so far (so it does not interfere) and just write simply what is shown in the screenshot:

    def first_non_repeating_letter(string):
        print(string)
    

    And see if that works (ie. prints out the input, for each tests). Many of us have tried it and it always works, so we are pretty sure it should work for you too. My suspicion is that something is happening in your code to prevent it from reaching the print statement.

  • Custom User Avatar

    It will work for every test case.

  • Custom User Avatar

    Do you really think I would post here if I didn't try that already?

    You wouldn't believe the amount of people that do that :P

    BTW, if you don't see any output for some test, it's because it's empty string. (anything else should show up)

  • Custom User Avatar

    Who really marks this as resolved before verifying.

    It was not issue in the first place, and print has to work.

  • Custom User Avatar

    I have just entered the kata, wrote on the first line in the function print(string) and it works.

  • Custom User Avatar

    Simply print the arguments of function, they'll be logged.

  • Custom User Avatar

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

  • Custom User Avatar

    That's a problem with your code, not a kata issue, you're testing too many divisors.

  • Loading more items...