From 642e99a1e47829b1a7a1b4f2381434d100f5a5b7 Mon Sep 17 00:00:00 2001 From: Your Name Date: Wed, 29 Oct 2025 18:45:14 +0530 Subject: [PATCH 1/2] Add project README with overview and usage --- README.md | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..0455416 --- /dev/null +++ b/README.md @@ -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. + + From a6e61713f1f03a5b0b24c81cf414bb64fcfceaad Mon Sep 17 00:00:00 2001 From: Your Name Date: Wed, 29 Oct 2025 18:47:59 +0530 Subject: [PATCH 2/2] Add project README with overview and usage --- Python-Programs | 1 + 1 file changed, 1 insertion(+) create mode 160000 Python-Programs diff --git a/Python-Programs b/Python-Programs new file mode 160000 index 0000000..26bd43b --- /dev/null +++ b/Python-Programs @@ -0,0 +1 @@ +Subproject commit 26bd43bface102a7e534df0cdf3d9580e933b177