n1 = int(input("Type a number: ")) if n1 > 1: for number in range (2, n1): if(n1 % number) == 0: print(n1, "is not a prime number") break else: print(n1, "is a prime number") #works