Here is a simple function that checks input for INT and RANGE. Here, returns 'True' if input is integer between 1-100, 'False' otherwise
def validate(userInput):
try:
val = int(userInput)
if val > 0 and val < 101:
valid = True
else:
valid = False
except Exception:
valid = False
return valid