Home
Dictionary
Game
About
Functions
A Function is a block of code which is ran only when called.
You can "pass" information through the function via arguments.
Also, a function can return an end result.
Syntax
def
function name
(
args
):
Example
- Make a function which returns the result of multiplying 2 passed values
a = 50
b = 5
def
multiply(value1, value2):
result = a * b
return
result