I am struggling to understand what the purpose is of the return statement in the function below. The print statement can be printed to the console without the return statement. Thus, it seems that, in this function, the return statement serves no purpose. What is the purpose of the return statement here? Have I overlooked something about the return operator?
def square(n): """Returns the square of a number.""" squared = n**2 print "%d squared is %d." % (n, squared) return squared # Call the square function on line 9! Make sure to # include the number 10 between the parentheses. square(10)