Ad
  • Default User Avatar

    That's not how u write list comprehensions tho. Maybe https://www.programiz.com/python-programming/list-comprehension can help u out~~

  • Default User Avatar

    ah yes, I see what you mean! thanks

  • Default User Avatar

    I think it is talking about @Pink Ghost's solution.

  • Default User Avatar

    Your arrays are so big that Python has no more ressources to answer.

    not sure if I understand what you're saying, but if that is the case, I would like to know what programming language more than 2000 coders used to solve the python translation...

  • Default User Avatar

    Your arrays are so big that Python has no more ressources to answer.

  • Default User Avatar

    I read someone say "You get that message when you attempt to run the example tests when there are none.

    Be sure that there are tests to be run.

    If there were problems in the Python version it would have been impossible that more than 2000 people passed it; it is for that reason that I considered the issue as resolved all the more that I tried several Python solutions without problem.

    Maybe you should look at your code... I think the Sieve is too much for that kata; see the array you need when n is big...

    PS1: (https://github.com/Codewars/codewars.com/issues/879) -> seems to be a corporate problem. It is not the case for your solution since I get the same result as you when I try it.
    PS2: Downvoting my post because you are not happy with it doesn't seem to be from a "Sorbonne University" student. I could downvote yours because I waste a lot of time to try your solution as well as other ones.
    Bonne journée et bon courage !

  • Default User Avatar

    Which language? I suppose it is Python. Not a kata problem. 2110 people passed the Python kata. I tried a few solution and they worked fine.

  • Custom User Avatar

    See the input for those tests, they're negative numbers, your code is failing with them.

  • Custom User Avatar

    Not a kata issue, read the instructions more carefully:

    Note: If the number is a multiple of both 3 and 5, only count it once.

    It's a problem with your code, use Question for things like this.

  • Custom User Avatar

    Are you seriously writing Python code in 1 line? You can't do that.

  • Custom User Avatar

    You have several problems with your code, but it isn't entering the if because its condition is wrong, either try if char in dict_list: or if (char in dict_list) == True:. Try to figure out the other problems yourself and if you can't ask again.

  • Custom User Avatar

    As I said, n is not always an integer. As an argument you can receive: a number, a boolean, a string. Your code should handle this correctly.

  • Custom User Avatar

    n is not always an integer, n > 1 does nothing, your loop is instantly returning the result without running more than once (you don't even need it if you're using math).

  • Custom User Avatar

    You return some arbitrary integer on first iteration of the loop, whereas the task is to return a string of 0's and 1's.