(8/10)

Asking Questions (Input Function) — Python typing lesson

Learn input/output to interact with your programs.

What you'll practice

Let's make our program interactive! The input() command waits for the user to type something.

  • input() pauses the program and waits for you to type and press Enter.
  • Whatever you type is stored in the variable (in this case, user_name).
🐍Python

Asking Questions (Input Function)

0 WPM
0% Accuracy
0:00 Time elapsed
1
2
3
print('What is your name?')↵
user_name = input()↵
print('Hello, ' + user_name + '!')
0 / 82
Press This!
👇
`~
1!
2@
3#
4$
5%
6^
7&
8*
9(
0)
-_
=+
⌫
⇥
Q
W
E
R
T
Y
U
I
O
P
[{
]}
\|
⇪
A
S
D
F
G
H
J
K
L
;:
'"
↵
⇧
Z
X
C
V
B
N
M
,<
.>
/?
⇧
Thumb
Index
Middle
Ring
Pinky