the error is "Traceback (most recent call last):
File "python", line 15, in
File "python", line 10, in is_int
TypeError: unsupported operand type(s) for &: 'bool' and 'str'"
It's supposed to tell whether a number is an integer. please help! I thought this would work.
Replace this line with your code. its = True def is_int(x): decimal = False for it in str(x): print it if it == ".": decimal = True elif decimal == True & it < 1: its = False break return its is_int(5.0)