Ad
  • Custom User Avatar

    Don't worry. I hope you try this kata again then, now that you see how it should work.

  • Custom User Avatar

    Ah, that makes much more sense. Apologies for my ignorance.

  • Custom User Avatar

    Already discussed below, but between 101 and 107 there is another prime: 103. So no gap of 6 there.

    A prime gap of length n is a run of n-1 consecutive composite numbers between two successive primes

  • Custom User Avatar

    Not sure if the tests have been changed at some point, but how can the following test work properly?
    Test.assert_equals(gap(6,100,110), None)

    101 and 107 are prime numbers between 100 and 110 with a gap of 6.

  • Custom User Avatar

    It worked for me and other 885 warriors. Maybe your code is the problem? It could be not fast enough.

  • Custom User Avatar

    Python version has several fatal errors in test cases preventing correct code from working. Skip this.