How can I set the value to test the function

How can I set the value to test the function ? (like I’ve done in exercise 3)

just call the function and supply the arguments you want?

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

Is the solution
When I call the function below it


I neither get an abs or Nope return in the console

if you want to print something, you should use the print keyword

OK, I see so even for the

    return "Nope"

It needs to be printed ?

return and print are two different things, return hands data back to the caller, and i don’t think i need to explain print :wink:

@lordcommandertd05365, unless your assignment specifically states that your function should print() something (or, if you are coding a script for yourself and you find yourself in need of some nicely formatted output, which can be obtained by means of a function specifically created for that purpose), you should generally view the output of your functions like this:

def my_function(a,b,c):
      # code here
      return some_answer