rotation of n prime numbers in python
def rotate(n1):
l=len(str(n1))
a=n1%10
n1=n1//10
n1=(pow(10,l-1)*a)+n1
return n1
def prime(n2):
count=0
for i in range(1,n2):
if(n2%i==0):
count+=1
if(count>1):
return False
else:
return True
l=len(str(num))
i=1
while(i<=l):
if(prime(num)):
num=rotate(num)
else:
return False
i+=1
return True