FRUSTATED FROM is_int


#1

def is_int(x):
if x - int(x) == 0:
    return True
else:
    return False

ERROR MESSAGE: File "python", line 2
if x - int(x) == 0:
^
IndentationError: expected an indented block:

THERE IS NO INDENTATION ERROR IN THIS CODE BUT IT SHOWS!!!1

CAN ANYONE SOLVE THIS PROBLEM!!
THANKS IN ADVANCE


#2

this nest this line:

if x - int(x) == 0:

inside the function it requires indent (4 spaces/1 tab is common)

so you do have an indention problem, the python interpreter doesn't throw an indent error when there isn't one


#5