From the course: Python for Non-Programmers
Unlock the full course today
Join today to access over 24,900 courses taught by industry experts.
Input - Python Tutorial
From the course: Python for Non-Programmers
Input
- [Instructor] I'm going to be honest, this might be the funnest video of the whole course. We're going to be learning about input and what's so cool about input is it allows users who are running Python code to actually interact and make decisions with that code. So let's go ahead and create our very first input, just all lowercase, type out input, and then do some parentheses and inside of the parentheses, we need to provide a string. And this is going to be the prompt that's going to be shown in the console. So for example, just type here, enter some text, okay? And you'll see how this works. So if we run this, you'll notice on the console, we now have the ability to type in some information. Isn't that cool? And we can hit enter. And what's so great is we can take whatever it is that someone types in and put it into a variable. So I can say, for example, user text is equal to whatever this input is and then I can…