So my code to test a prime number is as follows:
PrimeTest():
test = input ( "What number would you like to test? " )
test = int(test)
true = 0
divisor = 0
for divisor in range (2, 10):
if ( (isinstance( test/divisor, int )== True) & (test/divisor == int < 2) ):
print ("This number is divisible by " + str(divisor) )
if ( (test != divisor) & (isinstance( test/divisor, int)== False) ):
true = true + 1
if ( true == 8 ):
print ("This number is prime.")
PrimeTest()
The value output always have a float type, even though it is an interger (i.e. 2.0). How do I fix that?