Just to clarify, I am Using Python 2.7
I need to check if "x" is an integer (for example 7) or if "x" is a float with only a zero at the end of the decimal (for example 7.0). I have a format so all I need help on is the code.
x = raw_input("Please enter a number: ")
if type(x) == int or __________ :
A very simple test, which works because Python integers are unlimited in resolution:
return float(x) == int(float(x))
The result from
raw_input isn't a number, it's a string. That's why it has to be converted to