Hallp again plz! 19/19


#1

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

#2

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


#3

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


#4

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


#5

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


#6

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


#7

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


#8