This is why you need to typecast the input to an int using int(input("input something ")). Now you have an int!
Except... Not if the user types something not compatible with an Int.
Example of this:
Python is smart enough to know that "10" is a string of the Int 10. However, it's not smart enough to know that "ten" is a string representation of the number 10. As such, if you try to int("ten") you'll get an error (go ahead and try).
When dealing with things that can kick up errors, it's proper to put your code in a try/catch. A try/catch tells Pythong "Hey! This code is risky and might kick up an error, so keep an eye on it for me, ok?" Python will then keep an eye on it. If anything inside the try block kicks up an error, Python quits running the try block and goes to the catch block (which in Python is called except
The name of the exception trying to treat a non-int-compatible item as an int is known as ValueError
As such "except ValueError:" catches any time a user types "ten" in. And prints to the screen "You didn't type a number". The while loop then loops again, prompting the user for input (because userinput still isn't between min or max).