Answers for "write a python program that only accepts ints from the user without any char"

2

python check if input is a number

user_input = input("Enter something:")

if type(user_input) == int:
    return user_input
else:
    print("Not a number")
Posted by: Guest on July-22-2020
0

python input integer only

num = int(input("Enter an integer number: "))
Posted by: Guest on August-31-2020

Code answers related to "write a python program that only accepts ints from the user without any char"

Python Answers by Framework

Browse Popular Code Answers by Language