diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7773828 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +dist/ \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..09b1778 --- /dev/null +++ b/README.md @@ -0,0 +1,63 @@ +# MathMagic 🧙‍♂️✨ + +The `mathmagic` library is a simple Python package that provides basic mathematical operations. This project serves as a tutorial for learning how to use GitHub for collaboration, while also creating a functional library that can be extended and used in various projects. + +## Introduction 📘 + +This project was developed as part of an educational exercise to learn how GitHub can be utilized for collaborating on code projects. It features a simple set of functions that perform arithmetic operations, which are packaged into a Python library. + +## Features 🔥 + +- Basic arithmetic operations: + - Addition ➕ + - Subtraction ➖ + - Multiplication ✖️ + - Division ➗ + - Floor Division 🧱 + - Modulus 🔣 + - Square Root √ +- Easy to install 💾 +- Simple to use in any Python project 🐍 + +## Installation 💻 + +To install `mathmagic`, clone this repository and run the installation command from the root directory of the project: + +```bash +curl -LO https://github.com/junioralive/math-magic/releases/download/1.0.0/mathmagic-1.0.0-py3-none-any.whl +pip install mathmagic-1.0.0-py3-none-any.whl +``` + +## Usage 📚 + +Once installed, you can use the `mathmagic` library in your Python scripts as follows: + +```python +import mathmagic + +# Perform addition +result = mathmagic.add_numbers(1, 2) +print("The result of addition is:", result) + +# Additional functions can be used similarly +``` + +## Contributors 👥 + +Thanks to the following people for creating this project. + + + + + +## Learning Resources 📖 + +For those new to GitHub or collaborative software development, here are a few resources to get you started: + +- [GitHub's Hello World Guide](https://guides.github.com/activities/hello-world/) +- [Understanding the GitHub flow](https://guides.github.com/introduction/flow/) +- [Forking Projects on GitHub](https://guides.github.com/activities/forking/) + +## License 📄 + +This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. diff --git a/main.py b/main.py deleted file mode 100644 index 45172c6..0000000 --- a/main.py +++ /dev/null @@ -1,7 +0,0 @@ -from scripts import addition, division - -myaddition = addition.addition_numbers(1,5) -print(myaddition) - -mydivision = division.divide_numbers(10,2) -print(mydivision) diff --git a/mathmagic/__init__.py b/mathmagic/__init__.py new file mode 100644 index 0000000..92d238e --- /dev/null +++ b/mathmagic/__init__.py @@ -0,0 +1,7 @@ +from .addition import add_numbers +from .division import divide_numbers +from .subtraction import subtracte_numbers +from .multiplication import multiply_numbers +from .modulus import modulus_numbers +from .floordivision import floor_division_numbers +from .squareroot import square_root_number \ No newline at end of file diff --git a/scripts/addition.py b/mathmagic/addition.py similarity index 100% rename from scripts/addition.py rename to mathmagic/addition.py diff --git a/scripts/division.py b/mathmagic/division.py similarity index 100% rename from scripts/division.py rename to mathmagic/division.py diff --git a/scripts/floordivision.py b/mathmagic/floordivision.py similarity index 100% rename from scripts/floordivision.py rename to mathmagic/floordivision.py diff --git a/mathmagic/modulus.py b/mathmagic/modulus.py new file mode 100644 index 0000000..0089297 --- /dev/null +++ b/mathmagic/modulus.py @@ -0,0 +1,2 @@ +def modulus_numbers(a, b): + return a % b \ No newline at end of file diff --git a/scripts/multiplication.py b/mathmagic/multiplication.py similarity index 100% rename from scripts/multiplication.py rename to mathmagic/multiplication.py diff --git a/scripts/squareroot.py b/mathmagic/squareroot.py similarity index 100% rename from scripts/squareroot.py rename to mathmagic/squareroot.py diff --git a/scripts/subtraction.py b/mathmagic/subtraction.py similarity index 100% rename from scripts/subtraction.py rename to mathmagic/subtraction.py diff --git a/scripts/Modulus.py b/scripts/Modulus.py deleted file mode 100644 index 872f79e..0000000 --- a/scripts/Modulus.py +++ /dev/null @@ -1,12 +0,0 @@ -def modulus_numbers(a, b): - """ - This function takes two numbers and returns their modulus. - - Parameters: - a (int, float): The dividend. - b (int, float): The divisor. - - Returns: - int, float: The result of a % b. - """ - return a % b \ No newline at end of file diff --git a/scripts/__pycache__/addition.cpython-311.pyc b/scripts/__pycache__/addition.cpython-311.pyc deleted file mode 100644 index 5f67041..0000000 Binary files a/scripts/__pycache__/addition.cpython-311.pyc and /dev/null differ diff --git a/scripts/__pycache__/division.cpython-311.pyc b/scripts/__pycache__/division.cpython-311.pyc deleted file mode 100644 index 6bf15de..0000000 Binary files a/scripts/__pycache__/division.cpython-311.pyc and /dev/null differ diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..134bee6 --- /dev/null +++ b/setup.py @@ -0,0 +1,11 @@ +from setuptools import setup, find_packages + +setup( + name='mathmagic', + version='1.0.0', + packages=find_packages(), + author='Marvns', + author_email='unknown@unknown.com', + description='A simple math package', + python_requires='>=3.6', +)