human
I am working on the file "PwNT Notebook 2.ipynb".
The first task is:
Let's break down the syntax of the function declaration, line by line.
python
def square(x):
    answer = x * x
    return answer
The first line begins with the Python reserved word def.  (So don't use def as a variable name!).  The word def stands for "define" and it defines a function called square.  After the function name square comes parentheses (x) containing the argument x.  The arguments or parameters of a function refer to the input data.  Even if your function has no arguments, you need parentheses.  The argument x is used to name whatever number is input into the square function.  
At the end of the function declaration line is a colon : and the following two lines are indented.  As in the case of for loops, the colon and indentation are signals of scope.  Everything on the indented lines is considered the scope of the function and is carried out when the function is used later.
The second line answer = x * x is the beginning of the scope of the function.  It declares a variable answer and sets the value to be x * x.  So if the argument x is 12, then answer will be set to 144.  The variable answer, being declared within the scope of the function, will not be accessible outside the scope of the function.  It is called a local variable.
The last line return answer contains the Python reserved word return, which terminates the function and outputs the value of the variable answer.  So when you apply the function with the command square(1.5), the number 1.5 is the argument x, and answer is 2.25, and that number 2.25 becomes the output.
A function does not have to return a value.  Some functions might just provide some information.  Here is a function which displays the result of division with remainder as a sentence with addition and multiplication.
Can you write Python code for it?
 Hereever number is input into the square function?
assistant
#Hereever number is input into the square function.

def display_divmod(a,b):
    quotient = a // b # Integer division
    remainder = a % b #
    print "%d = %d (%d) + %d"%(a,quotient,b,remainder)

display_divmod(23,5)