Python get Integer input

Python Program to get an integer input from the user

Sample Input 1:

56

Sample Output 1 :

56

Try your Solution

Strongly recommended to Solve it on your own, Don't directly go to the solution given below.

#write your code here

Program or Solution

				
			
					
num=int(input("Enter a Number:"))
print(num)

			
				
			

Program Explanation

input() always returns string(), so the function int() converts the input to integer.

Comments