 Hey, what's going on guys root of the null here and today we are looking at some more Python We've been going on a roll with this little function miniseries and yeah, we're continuing with that today We've got a function parameters today, so I'm gonna open up idle and let's get started I'm gonna drag this right over here so you guys can see it Create a new window with control n and we will type out our program I'm gonna get started with my shebang line as always I'm gonna save this as file.python as always and we will write code as always Let's run a function. I'm gonna keep this sort of like skeleton Program going on here because I feel like it works really well. So Actually So I'm just gonna quickly rewrite everything that we've been working on the past Videos or so and it would not take me long I hope in the meantime you guys have been working on some pretty cool some pretty cool programs in your own time I doubt that What should we say New line and then we will print out User input wait no It was a let's say And then tab and then we can catnate that All right, check it out. Let's run this program. Let's run a function. What should we say? Brr brr brr brr brr, and let's say brr brr brr, okay, cool. That works perfectly fine So now we're gonna be looking at these function parameters inside these little parentheses here This is what we would this is where we would declare where we're gonna be using parameters or arguments So I'm going to use this as let's say name and Name can be what we're going who is going to say it get info. Let's say Dylan so now we can do what what would And we can catnate the name Say so name is becoming what we're passing in and we send in Dylan when we're calling get info Dylan replaces name in this in this case So user input equals raw input becomes what would Dylan say and then print Becomes a name plus equals says There you go So now that name is replacing it we can call us a couple of times. So let's let's run it What would Dylan say um I have no Taco Dylan says I have no taco Let's try it again. Let's use a Doug because he's my favorite man as you guys know so much. Let's let's run this program. What would Dylan say? The taco is Big Dylan says the taco is big. What would Doug say in Soviet Russia? Big is the taco. I have no idea. I'm just sort of screwing around, but yeah I hope you guys understand that idea is that when you whatever you pass into Name is what we're going to be using Okay So that makes sense doesn't it I'm gonna add a another parameter When you have multiple parameters, you can pass in as many parameters as you want to in all actuality But you obviously in your name for that thing. So what should we what should we call this? I think we should call this number and he is and Actually in name because we don't know if it's boy or a girl is Number I'm gonna drop this down to a new line is number number So there we go So now we have I know we got two note We got two parameters here this prayer these parameters are like they're separated by this comma and the comma represents Okay, we've got one parameter Let's move to another one You obviously don't need a comma for the last parameter because that's just a little bit silly But if we tried to run this now it would get angry at us because it takes exactly two arguments And we've only given one we can get around this but we're gonna work with that in the later video So let's try Dylan is number 39 and Doug is number one because he's a better person than Dylan At five let's run a function. What would Dylan say? The taco The taco I can't fit in the taco crap Okay, yep What we're doing here We can trying to concatenate string and integer objects and remember how we had a problem with that when we were trying To work with strings to later or like earlier in the series Well, what we have to do here is sort of cast Cast as the name for it convert The number to a string by using this str function Let's try one more time. What would Dylan say? The taco is big, but he can't fit in it's The Soviet Russia. Um, I stepped on the taco Dylan says I stepped on the taco and Dylan's number 31. What would Doug say? Eat it anyway Doug says eat it anyway and Doug is number one. Okay. This this works perfectly We've worked a little bit. We've got some concatenating going on. We've got some I've got some escape sequences We've got we've got variables. We've got numbers and that sort of thing But this still leaves some room for doubt. What if we what if we had a variable name to begin with? What if we had a If we had Dylan up top Dylan and we pass in Name this this won't matter because we're sending in the name in the global scope It becomes name in this scope, but if we set once we're done adding if we set name to We can use a relative assignment operator to multiply it by three You think that'll work. Let's try it. If not at five. What would Dylan say la la la la? Okay That works perfectly fine, but that's curious go because we want to get information about the name What happened what happened to Dylan did he did he multiply by three or something? What would Dylan say for the Google Google got Dylan is still Dylan, huh? Okay, so this goes to show that the scope still plays an effect here Okay, okay The scope when we pass in name Right here name is equal to Dylan Dylan comes up top Dylan comes to get info he goes in his name and then when he comes out Dylan is Dylan Dylan Dylan So if we print him here No one f not f5. What would Dylan say Krabberger Dylan Dylan Dylan Dylan because Okay, interesting. So we have Dylan Dylan Dylan dog and dog dog dog because dog is running once more because it's part of that So what if we brought in name Once more This still should this should still keep the way that we want it to except it's just going to be Dylan both times It's it'll be a single Dylan. It won't be three times Dylan What would Dylan say Krabberger Dylan says gargoyle and Dylan is number 39 Dylan because it's printing it out one last time and Then it runs it again with still that name Dylan variable right up top And it's not being modified by this function here because it's not in that scope. So Dylan would say And Dylan is number one now So we've sort of manipulated Dylan and Doug to our will and they've sort of become our minions And we could practically have them take over the world But you know, we've learned a lot about Python in that process So So I hope you guys enjoyed this video. I hope you learned a thing or two I hope you've been able to understand some multiple parameters understanding scope a little bit more understanding concatenation Understanding escape sequences and that sort of thing. So I hope you guys enjoyed this and I will see you again in the next tutorial Hey, what's up guys root going on? Whoa? Whoa, I Think I just screwed up my intro. I think I just screwed up my intro