Prime number program giving "wrong answer"
# Python program to check if the input number is prime or not num = 99 # take input from the user # num = int(input("Enter a number: ")) if num > 1: for i in range (2,num): if (num%1) == 0: print(num, "is not a prime number") print (i, "times", num//i, "is", num) break else: print (num, "is a prime number") else: print (num, "is not a prime number") ********************** When I run this I get ********************* 99 is not a prime number 2 times 49 is 99 ******************************************** This is not quite right, is this due to a float issue or not describing the number as an interger? Thanks for the help in advance!