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 is because the difference between two consecutive perfect squares is always odd. If you have a number n, then n+1 squared is: (n+1)^2 = n^2+2n+1. If you subtract n^2, our original number, you get n^2+2n+1-n^2 = (n^2-n^2)+ 2n + 1 = 2n+1. Any number of the form 2n+1 is odd, so the difference must always be an odd number.
This comment is hidden because it contains spoiler information about the solution
Timeout error for my Python code.
I mean, my code is like 27 lines long so I'm not proud of it or anything,
but I do think I solved it
Because doing it that way you skip values. Use a tool like http://www.pythontutor.com/visualize.html#mode=edit to see it.
In the second one you're comparing a number to a list.
This comment is hidden because it contains spoiler information about the solution
Whoa. Is there a name for the rule that this is expressing?