Skip to content

Simple Stopwatch Script Has Input Handling Bugs #52

Description

@ughte

The Simple Stopwatch script in beginner projects/Simple stopwatch/ has four critical bugs that make it unfriendly for beginner users:

Problem

  1. Case Sensitivity Bug: Only accepts lowercase 'y' or 'n'. Entering 'Y' or 'N' causes the program to exit immediately with no error message.
  2. Invalid Input Bug: Any input other than 'y' or 'n' causes the program to exit. No helpful error guidance.
  3. Empty Input Bug: Pressing Enter without typing anything exits the program.
  4. Poor User Experience: No feedback messages when the stopwatch starts/stops.

Steps to Reproduce

  1. Run the stopwatch script
  2. When prompted "Start stopwatch? y/n: " enter Y (uppercase)
  3. Expected: Program should accept the input and start the stopwatch
  4. Actual: Program exits silently with no explanation

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions