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.
generally whitout that plus one the function will return
True
for all square of prime numbers. :)I'll fork it, and test for that.
for i in range(2,int(sqrt(x))):
should be:
for i in range(2,int(sqrt(x))+1):
otherwise
prime(4)
will returnTrue
Question asks for a recursive approach :/