Hallp again plz! 19/19


for some reason my code doesn't work can someone plz help it would be AWESOME!!!!!!!!!!!

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


why do you check the type of s? the function parameter (n) will hold the value which you want to check if it is a integer or a float, then you can pass values into your function when calling it, to check if the value is a integer or a float


You didn't define s. You defined n as the parameter of the function.


do you guys have any ideas of what i should use to define s?


Why would you need to define s? What are you trying to do?


i meant to say can you guys give me the code to use i have been trying for a LONG time and i cant get this question done


I FIGURED IT OUT THANKS FOR YOUR HELP EVERYONE!!!!!!!!!!!!!!!!!!!:sunglasses: