The function above has the parameter number
. This parameter is used inside the function, and is considered a local variable. Using the variable number
outside the function will cause an error. The function reads the parameter number
and runs it through the different if
statements to print "Positive", "Negative", or "The number is zero". Expressions can also be used when calling the method as long as the expressions evaluates to a data type that is appropriate for the function.