From the course: Certified Entry-Level Python Programmer (PCEP-30-02) Cert Prep
Unlock the full course today
Join today to access over 24,500 courses taught by industry experts.
Receiving input data from the console - Python Tutorial
From the course: Certified Entry-Level Python Programmer (PCEP-30-02) Cert Prep
Receiving input data from the console
- [Max] So at this point, we know how to output messages to the console. Let's understand how to get data from the console. And in this case, we are going to receive data from the user, and that's a function that we have already seen quickly. It's input. So when you call input, it's a function. So we use parenthesis, and we execute this. The console is actually waiting for us to type something. So you can see I'm typing in the console, and that typing ends when you send a new line character, that is typically the Enter or Return key in your keyboard, and now the program is ending. So actually what will happen is that Python will wait here in this line to that input. So if I print Thanks and I execute this, you can see in the console, I'm not seeing Thanks. I need to type something, press Enter or Return to actually see the Thanks output. So Python will wait every time there is an input call until the user is typing…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
Fundamentals of Python12m 52s
-
(Locked)
Writing and executing Python code12m 46s
-
(Locked)
Python code structure10m 32s
-
(Locked)
PEP 8 style guidelines and indentation4m 30s
-
(Locked)
Variables and literals10m 55s
-
(Locked)
Output messages to the console4m 7s
-
(Locked)
Defining numerical representations9m 30s
-
(Locked)
Working with strings12m 14s
-
(Locked)
Using operators8m 57s
-
(Locked)
Receiving input data from the console5m 52s
-
-
-
-
-