Intro To Functions Flashcards
Recall code: assigning a function and creating one
def name_of_function():
Code here etc
Recall code: calling a function
name_of_function()
What does the following code do?
def name_of_function():
Code here etc
It creates a function and the “:” is assigning that function to the code below
What does the following code do?
name_of_function()
It initiates the function by calling it’s name
Recall code: assigning a parameter to a function
def my_function(parameter):
What does the following code do?
def my_function(parameter)
It creates a function along with a parameter (a placeholder for said condition)
Recall code: Calling a function and assigning a condition towards parameter
my_function(custom_name_here)