This is something that I have not been able to resolve.
The issue is that I am looking for an integer as an output.
I have written some sample code, which is:
tempVal1 = 4+5 print ("The value is of tempval1 integer: ", tempVal1, "\n and it is an integer ",isinstance(tempVal1, int)) tempVal2 = math.sqrt(36) print ("The value is of tempval2 integer: ", tempVal2, "\n and it is an integer ", isinstance(tempVal2, int)) The output is
from what I can see, the ouput of the square root is coming as a float.
I have looked at operator.index(tempVal2) and it sets everything as integer values.
The output that i am looking is to checkj if the number is an integer or not.
Can anyone advise me what steps to take?
If it was C# for example, I would try something like
if(int.TryParse(inputString, out val))
x.is_integer().