import math def prime(n): for x in range (2, math.sqrt(n)): if n%x == 0: break else: print 'prime'