I tried to solve this problem for a while and cannot get it to work correctly .. here is my current work
while True:
guess = int(raw_input('What is your number?'))
if 100 < guess or guess < 1:
print '\ninvalid'
else:
.....continue on
Now I did this when the user entered a number above 100 or less than 1, it prints "invalid". BUT what if I want to do this when the user enters a string that is not a number (alphabetic, punctuation, etc.), He also returns this "invalid" message?
I was thinking about using if not ... isdigit (), but that will not work, since I get the assumption as an integer so that the work on this range works. Try / except is another option that I was thinking about, but still have not figured out how to implement it correctly.