Decode School

Decode School - The School for Problem Solvers

Welcome to my blog. Subscribe and get my latest blog post in your inbox.

Python get Integer input

Python Program to get an integer input from the user

Sample Input 1:


Sample Output 1 :


Program or Solution

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


Program Explanation

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