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