From the course: Python for Non-Programmers
Unlock the full course today
Join today to access over 23,400 courses taught by industry experts.
Parameters - Python Tutorial
From the course: Python for Non-Programmers
Parameters
- [Instructor] Let's continue our discussion of functions by talking about parameters. Parameters are a way for us to pass some information into a function. And why would this be useful? Well, let's take a look at our challenge that we had from the last video where we print out Hello Nick Every time we run this, it says Hello Nick in the console. Okay, what if we wanted to make a function where each time we run it, we could pass in a new person's name and have that be printed? Well, we can with parameters. So parameters go inside of these parentheses here. If you're wondering what those are about and how you're about to learn, so with a function, you create a name of a variable that's going to be passed into your function. So in this case, if we want to print out someone's name, I'm just going to put name for the name of that. So we have this function called hello that takes in a parameter name and the way that we…