if __name__ == '__main__': num = int(input("Enter a number:")) if num <= 1 : print("Enter a Number greater than 1") exit() pn_flag = 0 for i in range(2,int(num/2) + 1): if num % i == 0: pn_flag = 1 break if pn_flag == 1: print("{} is not a prime number".format(num)) else: print("{} is a prime number".format(num))