Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/musatahawar/stop-watch
This Python program implements a simple stopwatch using the `time` module. It allows users to start, stop, and display the elapsed time of the stopwatch.
https://github.com/musatahawar/stop-watch
Last synced: 5 days ago
JSON representation
This Python program implements a simple stopwatch using the `time` module. It allows users to start, stop, and display the elapsed time of the stopwatch.
- Host: GitHub
- URL: https://github.com/musatahawar/stop-watch
- Owner: MusaTahawar
- License: mit
- Created: 2023-11-26T13:24:37.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-11-26T13:26:04.000Z (about 1 year ago)
- Last Synced: 2024-11-09T17:18:57.428Z (2 months ago)
- Language: Python
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Python Stopwatch
This Python program implements a simple stopwatch using the `time` module. It allows users to start, stop, and display the elapsed time of the stopwatch.
## Prerequisites
To run this program, you need Python installed on your machine. If you don't have Python installed, you can download it from [Python's official website](https://www.python.org/downloads/).
## Usage
1. Clone the repository or download the Python file `stopwatch.py` to your local machine.
2. Open a terminal or command prompt and navigate to the directory where the `stopwatch.py` file is located.
3. Run the program by executing the following command:
```bash
python stopwatch.py
```
This will start the stopwatch program.4. Follow the on-screen instructions:
- Enter 'start' to begin the stopwatch.
- Enter 'stop' to pause the stopwatch and display the elapsed time.
- Enter 'quit' to exit the program.## Example
```bash
Enter 'start' to begin, 'stop' to end, or 'quit' to exit: start
Stopwatch started!
Enter 'start' to begin, 'stop' to end, or 'quit' to exit: stop
Elapsed time: 5.20 seconds
Enter 'start' to begin, 'stop' to end, or 'quit' to exit: quit
Exiting the stopwatch...