What should I do with invalid input?

What should be my approach towards invalid input.

There will not be invalid input. If a program says a number will be between 0 and 100, it will be between 0 and 100. There is no need to write if (number>=0 && number<=100), or do anything in other cases.

1 Like

It has happened to me several times that after putting the validation my program got AC.
I can show you my prog.

simply use try and except for error handling


for python