This Python project validates and classifies Nigerian bank accounts based on the Nigeria Uniform Bank Account Number (NUBAN) scheme.
# NUBAN Classifier
The NUBAN Classifier is a Python-based project for validating and classifying Nigerian bank account numbers based on the **Nigeria Uniform Bank Account Number (NUBAN)** scheme. The system uses the NUBAN algorithm defined by the Central Bank of Nigeria (CBN) to calculate check digits, validate account numbers, and identify the banks to which they belong.
---
## Features
1. **Check Digit Calculation**: Computes the check digit for a NUBAN account number using a standardized algorithm.
2. **Validation**: Verifies the integrity of a NUBAN account number based on its check digit.
3. **Bank Classification**: Identifies possible banks for a given account number.
---
## Installation
### Prerequisites
- Python 3.7+
### Setup
1. Clone the repository:
```bash
git clone
github.com
cd nuban-classifier
```
2. Install dependencies:
```bash
pip install -r requirements.txt
```
3. Run tests to verify the installation:
```bash
pytest tests/
```
---
## Usage
### Example Code
```python
from nuban_classifier import classify_account_number
# Example account number
account_number = "1234567890"
matching_banks = classify_account_number(account_number)
if matching_banks:
print(f"The account number may belong to: {', '.join(matching_banks)}")
else:
print("No matching banks found.")
```
### Explanation
- `calculate_check_digit(serial_number, bank_code)`: Calculates the check digit for a given serial number and bank code.
- `classify_account_number(account_number)`: Identifies all possible banks an account number may belong to.
---
## Project Structure
```plaintext
.
├── nuban_classifier.py # Core module with validation and classification logic
├── tests/ # Unit tests
│ ├── test_account_classifier.py
├── requirements.txt # List of dependencies
├── README.md # Project documentation
```
---
## Tests
### Running Tests
Use `pytest` to run the included unit tests:
```bash
py …