The following are links to additional questions that our community has asked about this exercise:
This list will contain other frequently asked questions that aren’t quite as popular as the ones above.
Currently there have not been enough questions asked and answered about this exercise to populate this FAQ section.
This FAQ is built and maintained by you, the Codecademy community – help yourself and other learners like you by contributing!
Not seeing your question? It may still have been asked before – try () in the top-right of this page. Still can’t find it? Ask it below by hitting the reply button below this post ().
It would be the norm, not the exception in most cases. Here the author wishes the functions to print the output, rather than print the call returns, but normally we would print on return, not inside the function.
return is important if we wish to keep the data alive when we exit the function. It is the only means we have of handing the data back to the calling scope.
In this example, you can see that with the 2 functions: (biggest_number and smallest_number), the parameters of both have an asterisk before it whereas distance_from_zero does not. This is for one simple reason: If you want to have more than one or multiple numbers defining a function, you need to put an asterisk before it’s parameter in order for the syntax to support more than 1 number. Because if you look at the bottom of the script, you realize that both biggest_number and smallest_number have been defined with more than 1 number, whereas distance_from _zero is defined only with -10.
DO NOT FORGET TO PUT AN ASTERISK BEFORE YOUR PARAMETER IF THE FUNCTION IS DEFINED WITH TWO OR MORE NUMBERS. IT COULD MEAN THE DIFFERENCE BETWEEN A SYNTAX ERROR AND A FULLY FUNCTIONAL CODE