From the course: Python for Non-Programmers
Unlock the full course today
Join today to access over 24,700 courses taught by industry experts.
Functions - Python Tutorial
From the course: Python for Non-Programmers
Functions
- [Instructor] Congrats, you've now finished your second Python project and we're back to learning concepts. We've got one last project that we're going to finish up to wrap up the whole course. So let's learn the skills that we need in order to do that. So in this video, we're going to be learning about functions, which functions are a way to give a name to a chunk of code. It's about that simple. So how do you make a function in Python? Well first, you type out the word def. Def is short for define. Whenever you make a function, create a function, it's also called defining a function. So that's why we have the term def here. So we say def space, and then we give our function a name. So I want a function that can print out a dog barking. So I'm going to call my function bark, and then, I'm going to give some open and closed parentheses, and then, I'm going to wrap it up with a colon. So you've noticed, anytime in Python…