That checks to make sure x is a number and not say a letter or the # sign or something.
Now, for a new project, I need to modify this code to also check that the number is positive and falls within a particular range(say less than 1000, just as an example). I'm pretty sure I need to make a modification to the while statement but I am not exactly 100% sure how or what.