with a simple filter that test input against a range 0-100.
def foo(foo_input): if 0 <= foo_input <= 100: return f_input
If a return statement is not reached, the function returns None.
None
def set_x(): x = 2