for i in range(2, 20): for x in range(2, i): if i % x == 0: break else: print(i, "is a prime number")