How to Ask User For Input in Python


In this example we will show how to ask the user for input in Python.

Source Code

num = int(input('Please type a number between 0 and 100: '))
print('The number you type is: ', num)

Output:

Please type a number between 0 and 100: 50
The number you type is:  50
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments