Bummer! This is just a preview. You need to be signed in with an account to view the entire instruction.
Instruction
Function Gotcha's
Equal Numbers of Arguments and Parameters
Here's the example code from the previous video:
def add_two(num):
val = num + 2
return val
Because we've written our add_two()
function to receive an argument, we absolutely have to send one every single time we call the function. If we called add_two()
without passing an argument, we'd get an error.