Python review 19


#1

def distance_from_zero(abs):
if type(abs) == int or type(abs) == float:
it give me this error message:
File "python", line 2
if type(abs) == int or type(abs) == float:
^
IndentationError: expected an indented block


#2

Python requires one tab indentation after every colon, what this means is that for every place there is a colon the next line should be indented by four more spaces,

def example(): #colon here
    if something: #colon here
        some indented code
    else:
        some indented code