Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
This comment is hidden because it contains spoiler information about the solution
Because it was not initialized using the 'var' or 'let' keyword.
This comment is hidden because it contains spoiler information about the solution
Shouldn't use LCM in this case. GCD will always be 1 when at least one of its arguments is prime.
Failed because "'7.65800124175e+12' should equal '7.65,800,124,175e+12'." However this is not how scientific notation works. This test either needs to change the notation or be removed.
Slight mistake in test cases for Python. lines 3 and 5 use test.describe() instead of test.assert_equals().
The test cases should be revised to exclude 1 from the list. 1 has no prime factors.
isinstance(x,int) can also test for int. It returns a false positive for Boolean variables, though, so you also have to test for those.
Need to specify that math.factorial() is not allowed in description.
You don't need to loop from 1 to n to find all divisors of n.
Think about how you could find all the divisors looping only through the square root of n.
For example, if n=16 and you need to find all divisors, how can you find the divisors by looping only through 1-4 (inclusive)?
This will definitely speed up your code, especially for larger values of n.
Change the wording slightly. Instead of saying "all 9s between sevens" it really should say "Replace all instances of '797' with 77" or something equally clear. An example of where this is ambiguous would be a number like 799999997. 9 is between 7s but this isn't what your kata is looking for in a solution.