Send to a Friend

chk8n's avatar

How to check for user input for both intergers and to see whether user select numbers in between 0-200? Python?

Asked by chk8n (106points) February 3rd, 2011

User has to input a number (no letters or characters), and has to be between 0–200. Otherwise I want to inform the user to re enter the numerical answer based on these requirements.

Basically if a user put “a” instead of a number, I want the error to print “give number between 0–200”- or if user put “300”, same error pops up.

How do I do that?
If anyone can provide a detailed answer, it will be perfect.
Im in beginner level in high school.

Thank you!

Using Fluther

or

Using Email

Separate multiple emails with commas.
We’ll only use these emails for this message.