Taking input from user
Taking input from the user during the run time is known as taking user input.
To take input from the user, we use the input() function.
Once the user enters the input, we also have to store it somewhere for using it later.
Syntax :
variablename = input()
Example:
user_input = input()
print(user_input)
Here, when we run the program, the control will wait for the input without any response or notification to the user. So let us add a message for the user, by which any user can understand that the control is waiting for their input.
user_input = input("Enter the value")
print(user_input)
Now, when we run the program, it will display a message while waiting for the input.
Enter the value 5
5