def is_prime(x): if x<=1: return False elif x == 2: return True elif x > 2: i=0 while x>i: i=2 if float(x)/i == int(x/i): return False break i = i+ 1 else: return True
I don't know but when I run this code following error is appearing.
The program took too long to finish. Check your code for infinite loops and try again.
Replace this line with your code.