Review: Built-In Functions - how to run tests


#1

How do I run or test this code? I receive the 'none' response in the console...

def distance_from_zero(dis):
    if type(dis) == int or type(dis) == float:
        return abs(dis)  
    else:
        return "Nope"

#2

To run the code, write a call expression...

print distance_from_zero(-42)

#3

You have to use 'print' to show it on the console. So for example, it would be print "Nope"