Built-In Functions Please Help!


i dont know whats wrong?

def distance_from_zero(num):
if type(num) == int or type(num) == float:
return abs(12345)
return "Nope"


Your IF and ELSE statements should both end with a colon ( : )


Yeah, but you definitely are a good programmer!


it should look something like this:

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

the abs() must contain the variable that you put in the distance_from_zero(this variable right here)

Hope this helped!

Don't forget to indent the if,else, and the returns!!!