An Introduction to Python For Undergraduate Engineers/Getting Inputs< An Introduction to Python For Undergraduate Engineers
If you want your program to get an input from the user (for example to enter some parameters for your program to use), we use the input("Message here") command, as follows:
number = input("Enter a number: ") username = raw_input("Enter your name: ")
When the program is run, this will show the user the message Enter your name: and will then save whatever the user inputs as the variable username. This can be very useful when writing a program to solve engineering type problems, as your program could ask the user to enter some parameters (such as mass, volume etc.) for your program to use.