number = int(input("Enter a number: ")) flag = False if number == 1: print(number, "is not a prime number") elif number > 1: for n in range(2, number): if (number % n) == 0: flag = True if flag: print(number, "is not a prime number") else: print(number, "is a prime number")