I have developed a code to find a prime number using python. But it keeps saying the numbers are prime even tho they are not. I am new to python so my knowledge in syntax is really not as good
when i input the number 15 it would say it is a prime number. but it shouldn't be a prime number
a = 0
#num will be the number we are checking
x = int(num)
num = sqrt(float(num))
num = int(num)
primeCheck = True
for a in range(3, num, 2):
if x == 1 or x == 2:
primeCheck = False
#not prime
if x % a == 0:
primeCheck = False
#not prime
if primeCheck == true:
#prime