Parts of a Function
Challenge 2-1: Functions
Challenge 2-1: Functions
>>> def say_hello(myname):
print('Hello', myname)
def - This is a keyword. We use this to let Python know that we’re defining a function.
myname - This is a parameter (and a variable). We use this to represent values in the function.
print('Hello', myname) - This part is the body of the function. This is where we describe what the function does.