def square(a):
    return a*a

print(square(1), square(2), square(5))

square('a') # This should give an error

def minimum(a, b):
    if a<b:
        return a
    elif b<a:
        return b
    else:
        return a

minimum(4,5)

minimum(4,0)

"""
Explanation: Functions
As in any other language Python allows for the definition of functions.
Functions are a set of sequence of instructions that receive well define inputs
and produce some outputs.
To define a function Python uses the word def. The value that the function returns
must be preceded by a return. The syntax would be:
python
def FUNCTION_NAME(INPUTS):
    INSTRUCTIONS
    return OUTPUTS
or
python
def FUNCTION_NAME(INPUTS):
    INSTRUCTIONS
The return function is optional. Not every function should return an output. 
Some functions simply modify the inputs without producing any output.
Important:
The instructions and the return statements belonging to the fuction must be indented by 4 spaces inside the header. Indentation is the only way that Python has to group lines of code.
Let's have some simple examples
End of explanation
"""


def power(a, b=2):
    return a**b

power(2)

power(2, b=5) # This is the prefered way to change the default parameters 

power(2,5) # This works as well

"""
Explanation: Optional parameters
Functions can have default parameters. These parameters are defined using the syntaxis arg=value, 
where arg is the argument name and value is the default value for that argument.
Here are some examples
End of explanation
"""


