number = int(input("What number? ")) prime = True for divisor in range(2, int(number/2)): result = number % divisor if result == 0: prime = False if prime == True: print("This is a prime number!") else: print("This number is not prime.")