Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed Functions, Packing, and Unpacking!
You have completed Functions, Packing, and Unpacking!
Preview
Create a function of your own.
This video doesn't have any notes.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
don't get too hung up on typing or
trying to copy me as I go.
0:00
There will be opportunities for
you to pause the video and
0:01
try things out on your own.
0:04
Functions serve the same purpose
in every programming language.
0:05
But the syntax for
0:08
writing them is going to be a little
different from one language to the next.
0:09
In Python you know you've encountered
a function when you see the keyword def
0:13
that's D-E-F.
0:17
Followed by a snake cased string,
0:18
which is the name of the function followed
by a set of parentheses and a colon.
0:20
Snake casing is when you string together
words using underscores instead of spaces.
0:24
Snake casing doesn't use
any capital letters.
0:29
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up