Re: validation input

Posted 28 November 2012 - 08:56 AM

So what are the conditions for a valid piece of input? Why is circle100 invalid and circle50 valid? Help me understand in more general terms, as that's how we will be writing code- to be more general and reusable.

Re: validation input

Posted 29 November 2012 - 07:36 AM

Well, first of all, the user must be aware of what are the commands he should type in. You could use another print statement listing the commands that the user can use so that the user will know the commands that can be typed.

Once you do that, according to the options, you can give 'if' conditions and for an 'else' condition, you can ask the user to try again.