 Hey, what's going on guys root of the null here also known as root from null shell.com and welcome back to your seventh tutorial in Python today, we're gonna be looking at some input and output in the language and Well, let's get started. I'm gonna open up idle and you should do the same I'll drag it over so you guys can see what we're working on and let's get to programming now today Um, we're gonna be creating a new window so you can hit control R or you can sorry control N And you can actually create a new window. You'd be able to do that with the file menu But hotkeys are awesome and you should get used to using them. So Let's get things ready so you can see things and let's get going now Lately you've been using the print function or at least I've been using the print the print function I hope you have to so you can understand and you can display data and that sort of acts as the output call Now you're gonna hear the term tossed around a lot std out Well, and that's kind of denoted as standard output So for you have that counterpart though, too, you have standard input std in so now in Python print acts as your standard output and Input and there are two functions or input you have input Let's get that going here standard input and you have raw input now these differ in some ways though input will only take numbers as What they're going to process and raw input will take strings so they will practically take anything So if we hop back on over to our interactive shell we can sort of play with these functions to see what they'll do so I'm to try raw input and now these functions have a One parameter or one argument or one piece of data that you can pass to the function and Now I'm sorry. I don't I don't know if I want to call them functions or not You might hear the term methods they really think they're actually they are the exact same thing They're just two different names for it. Some language is called them different things But yeah, let's get raw input and we'll pass in a string now this argument or this parameter what you're sending into the function is a prompt So let's say please enter something and now let's get started to enter raw input And it's going to say please enter something. So I'll just enter hello and Because we're using raw input though It's gonna be able to process that because it's a string if we did that again, and we let's get our string here And we typed in like forty five thousand three hundred and forty two I don't care. It's still gonna be able to process that because it's reading it as a string if we tried input Please enter something Please enter something if we type in hello, it's gonna throw an error at us because it doesn't understand that it wants a number So if we do that one more time we type in five thousand three hundred and forty two That's okay because it's only taking an integer because even functions work How they how they do their thing is that they take in data and they process it and then they will return The data that they finish so it's in our case input and raw input are going to return what you've what you've typed in raw input returns a string and input returns an integer so Knowing this we're able to manipulate what we want to do So if we hop on over to our program, I'm gonna clear the board here, but since we're running Linux Let's get start. Oh, I'm running Linux. I don't know about you. I'm going to get started with a shebang line I don't know if you remember that from the last video, but Hashtag exclamation point Ford slash us our bin environment Python need a space here and that should be good to go. I'm gonna save this We'll save it as file dot Python because I'm one original but you can name whatever you want, of course And let's get going first. We're gonna want to use a variable Let's set up something called a user input and we're going to use our assignment operator Get that good and we'll use raw input as our new function here So let's pass a prompt to it. So say something and there we go. I'm at a semicolon here Which is optional, but you don't have to do it You may and now we can use you entered and we'll print to display out on the screen And then we'll create a new line and a new tab with our escape characters So you guys have a little bit of practice with those and let's concatenate on that variable Use your input awesome. So now that looks like all we need to do. Let's run this. I'm gonna hit f5 and Now let's say something. Let's say 43 you entered 43 if we go back and do that again say something. Let's say John Hammond You entered John Hammond. Look at that So that's really all you're gonna be working with but you do want to know the difference between input and Raw input now, I know I haven't talked about too much I know I haven't talked too much about functions or function theory or the concepts behind those But they are important But and I'm sure it'll come together once I once I go more in depth with it because Functions do have these two parentheses They do something you can pass input in as parameters or arguments and they will return something to you So that's why when you run raw input and we're setting what it returns to user input So when we retrieve the information that the user types in it goes to user input our variable right up here And then we can display that with print you entered and then we can catenate on user input exactly what we've just typed in Um part of me feels like that's easy to understand just because it's a it's simple another part of me feels like That's hard to understand just because I'm throwing around so much terms and trying to mix together everything that you've learned But if you try and dissect it and you just look at it with with wide eyes You know you try and understand everything that you can you should be able to understand it So thank you guys for watching. I hope you'll be able to find this useful you are definitely going to be using inputs so many times in your life because user input is the most important part of programming other than variables because you need those two together you need to be able to input information and manipulate that with variables those two in combination is the greatest piece of programming So see you guys soon though. Thank you for watching. It'd be cool if you give me a like and maybe subscribe I don't know. It's whatever you want to do, but I'll see you again. Bye