Developers often have a need to interact with users, either to get data or to provide some sort of result. Most programs today use a dialog box as a way of asking the user to provide some type of input. While Python provides us with two inbuilt functions to read the input from the keyboard.
- input ( prompt )
- raw_input ( prompt )
a = input('Enter first number: '); b = input('Enter second number: '); a = int(a); b = int(b); avg = (a+b)/2; print('Average of a + b is: ', avg);