Review: Built-In Functions - how to run tests


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)  
        return "Nope"


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

print distance_from_zero(-42)


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