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()


user_input = 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")

Now, when we run the program, it will display a message while waiting for the input.

Enter the value 5

© Copyright - 2018 - 2023 | All rights reserved at Funda of Web IT