DEV Community

ItsEvilDuck
ItsEvilDuck

Posted on Originally published at itsevilduck.gumroad.com

Average Calculator with Input Validation - Python Script

I've built a small Python script called Average Calculator with Input Validation. It's designed to be straightforward and useful for basic tasks.

The script first prompts you to enter two numbers. It includes input validation to ensure that what you enter is actually a number. If the input is invalid, it will prompt you again until valid numbers are provided.

Once two valid numbers are entered, the script calculates their average. A secondary check is performed to see if both of the numbers you entered are above 10. The result of this check is then reported to you.

This tool is suitable for anyone needing a quick way to average two numbers with error handling, or for developers looking for a simple Python script example demonstrating input validation and conditional logic. It's a small utility built with practicality in mind.

Average Calculator with Input Validation

Top comments (0)