python-beginner-projects icon indicating copy to clipboard operation
python-beginner-projects copied to clipboard

Enhancement: Implement User Input Validation for Game Modes

Open bhandareasmita opened this issue 1 year ago • 1 comments

Issue Description:

Current Behavior: As of now, there is no user-input validation for the gaming modes in the Number Guessing App. This means that users can input any value, including non-integer or out-of-range values, which may lead to unexpected behavior or errors.

Enhancement Request: To provide a more user-friendly and robust experience, we propose implementing user input validation for both gaming modes. This validation will ensure that users can only select valid gaming modes (1 or 2) and will provide clear instructions or error messages if they enter invalid input.

Proposed Changes: When the user is prompted to select a gaming mode, we will validate their input to ensure it is an integer. If the input is not an integer or if it doesn't match any of the valid gaming modes (1 or 2), the user will be presented with a clear error message. The user will be prompted to re-enter a valid input, thus preventing unexpected behavior and improving the overall user experience.

Expected Benefits: Improved user experience by preventing invalid input. Clear and informative error messages for users who enter incorrect input. Enhanced robustness of the application by handling user input more gracefully.

bhandareasmita avatar Oct 27 '23 10:10 bhandareasmita

I would like to help to solve this issue, please let me know if is possible.

Gabriela20103967 avatar Nov 01 '23 02:11 Gabriela20103967