Ad
  • Custom User Avatar

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

  • Custom User Avatar

    Fractions bigger than 1 are arbitrarily False inputs. By specifying positive for num and den, you achieve two things: you exclude arbitrarily False inputs for fractions less than 0 ( which is just as arbitrary as bigger than 1 ), and you exclude 0 as an input.

    Inputs bigger than 1 are a senseless special case, as you can see in everybody's solution. You might as well exclude them.

    Inputs equal to 0 are excluded for no good reason. You might as well not exclude them.

  • Custom User Avatar

    Your function must return None if q does not represent a rational number (i.e. if the last element is 0).

    what's the point? This brings nothing interesting to your kata, you should just drop those inputs.

  • Custom User Avatar

    It would be nice to have some information on the inputs (ie. how large can n be? etc.)

  • Custom User Avatar

    Why q is not given as Fraction rather than list? (you can't have 1/0 (but that is pointless to test anyway))