MyPackage is a Python library developed as part of the 9 week ALX Python Programming program. It provides utility functions for working with numerical data, specifically extracting the top n values from a dataset in descending order.
Clone the repository and install the package locally:
pip install .from mypackage.myModule import top_n
numbers = [8, 3, 2, 7, 4]
# Get top 3 values
result = top_n(numbers, 3)
print(result) # Output: [8, 7, 3]- Extract top n values from a list
- Returns results in descending order
- Simple and efficient implementation
- Lightweight and easy to integrate
This project was developed as part of the ALX Software Engineering program to demonstrate:
- Python package structuring
- Modular programming
- Writing reusable functions
- Version control using Git and GitHub
- Documentation and testing practices
Ryan Kyaka
Licensed under the MIT License. See the MIT License for details.