Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Python-Programs
Submodule Python-Programs added at 26bd43
44 changes: 44 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
## Python Programs Collection

This repository contains a collection of beginner-friendly Python scripts covering basic programming concepts (input/output, conditionals, loops, functions, simple games, and small utilities). It is suitable for learners practicing Python fundamentals and for contributors making incremental improvements.

### Structure
- `Python-Programs/`: Individual standalone scripts. Many are interactive and can be run directly with Python 3.

### How to Run
Use Python 3.10+.

Run any script from the project root or from within the `Python-Programs` directory, for example:

```bash
cd Python-Programs
python3 "Basic Calculator Operartion.py"
```

Some scripts accept command-line arguments. For example, the workout timer:

```bash
python3 "Workout Timer.py" --seconds 10
```

### Recently Improved Scripts
- `Basic Calculator Operartion.py`: Refactored into reusable functions with input validation and an optional CLI.
- `rock-paper-scissors.py`: Fixed game loop, added input validation, replay support, and clearer prompts.
- `Workout Timer.py`: Added `argparse` support, countdown behavior with one-second intervals, and clearer output.

### Contributing
Contributions are welcome! Ideas:
- Improve input validation and error handling in scripts
- Add documentation or usage examples to script headers
- Convert interactive scripts to also support command-line flags via `argparse`
- Add small, self-contained new programs demonstrating Python basics

Please keep changes focused and well-documented. For any script you modify, try to:
- Preserve existing behavior where reasonable
- Add helpful prompts and messages
- Guard execution with `if __name__ == "__main__":` when adding functions

### License
If not specified elsewhere, contributions are provided under the MIT license.