A collection of basic Python programs for learning and reference.
Calculates the factorial of a given number using both iterative and recursive approaches.
Usage:
python factorial.pyFeatures:
- Iterative factorial calculation
- Recursive factorial calculation
- Input validation and error handling
- Interactive command-line interface
- Python 3.x
- Clone the repository:
git clone https://github.com/Sbiswas001/Basic-python-programs.git
cd Basic-python-programs- (Optional) Create a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install dependencies (if any):
pip install -r requirements.txtEach program can be run independently:
python factorial.pyBasic-python-programs/
│
├── README.md # Project documentation
├── requirements.txt # Python dependencies
├── .gitignore # Git ignore rules
└── factorial.py # Factorial calculator program
Feel free to add more basic Python programs to this repository!
This project is open source and available for educational purposes.