def: The def keyword tells Python we are defining a new function.
Function name: The word we will use to call the function. A good
function name helps explain what the function does!
Round brackets (): Go after the function name.
Parameters: Say what information (arguments) the function will
require to do its job. This function expects one argument - a number
to square. Parameters go inside the round brackets.
Colon: The def line ends with: (a colon).
Function body: The code that will run when the function is called.
We can put any code we like inside the body of a function. The body
needs to be indented (just like an if statement).
return: Stops the function and says what information the function
should return to the code that called it.
When Python reaches a function call in our code, it will run (or execute)
that function.
Once the function finishes (stops executing), Python will return to the
place in the code where the function was called, and continue running the
code from there, as usual.
Python will stop executing the function when it reaches the end of the
function, or when it reaches a return in the function.
def make_symbols(symbol, thing, number):
make_symbols = (symbol+thing) * number
return make_symbols
print(make_symbols('#', '&', 100000))