Validated user input in Python

When it comes to validated user input remember it depends on what you’re gonna use the input for, for example if you want to ask the user for a number to do a sum, you need to add int (for integer) or float (for floating point numbers).

Validated user input in Python

Another example would be in a loop, where the use of characters is often used. The point is to always specify what sort of variable the program is expecting to receive.

Validated user input in Python

CC BY 4.0 Validated user input in Python by tywins is licensed under a Creative Commons Attribution 4.0 International License.

Comments are closed.