From 2acd8b4854e259f91724509f22908a9d1f71c3e2 Mon Sep 17 00:00:00 2001 From: junioralive Date: Tue, 6 Aug 2024 21:56:03 +0530 Subject: [PATCH] Final Commit --- .gitignore | 1 + README.md | 63 +++++++++++++++++++ main.py | 7 --- mathmagic/__init__.py | 7 +++ {scripts => mathmagic}/addition.py | 0 {scripts => mathmagic}/division.py | 0 {scripts => mathmagic}/floordivision.py | 0 mathmagic/modulus.py | 2 + {scripts => mathmagic}/multiplication.py | 0 {scripts => mathmagic}/squareroot.py | 0 {scripts => mathmagic}/subtraction.py | 0 scripts/Modulus.py | 12 ---- scripts/__pycache__/addition.cpython-311.pyc | Bin 294 -> 0 bytes scripts/__pycache__/division.cpython-311.pyc | Bin 321 -> 0 bytes setup.py | 11 ++++ 15 files changed, 84 insertions(+), 19 deletions(-) create mode 100644 .gitignore create mode 100644 README.md delete mode 100644 main.py create mode 100644 mathmagic/__init__.py rename {scripts => mathmagic}/addition.py (100%) rename {scripts => mathmagic}/division.py (100%) rename {scripts => mathmagic}/floordivision.py (100%) create mode 100644 mathmagic/modulus.py rename {scripts => mathmagic}/multiplication.py (100%) rename {scripts => mathmagic}/squareroot.py (100%) rename {scripts => mathmagic}/subtraction.py (100%) delete mode 100644 scripts/Modulus.py delete mode 100644 scripts/__pycache__/addition.cpython-311.pyc delete mode 100644 scripts/__pycache__/division.cpython-311.pyc create mode 100644 setup.py 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 5f6704167145c40e107249c14e59f79b1364447c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 294 zcmZ3^%ge<81fE|vrl|ty#~=<2FhUuhd4P=R3@HpP3{eazjKK_=Ovy|zML-(FW(H!Y zx*CQW#ws8esE*NZB~bA##>88UNyQ*#3JSkWldWPxi&Kk=V@fhovr1!JQj4=o@(W^e z6H795a}(1ulVggLi!uvJienN}QZh?2^YioyDsOQEIq`X=xk*5sMeIPMK&~t11`-Vn zH@JB^0y~WxygmcD41Su7U2KczG$)vkyW$OUVc12R4^Gcq!M PU}9wC|G=_ diff --git a/scripts/__pycache__/division.cpython-311.pyc b/scripts/__pycache__/division.cpython-311.pyc deleted file mode 100644 index 6bf15dee7b3743def40e1acdcc30ebcc47145bbc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 321 zcmZ3^%ge<81ioK4ruhNs#~=<2FhUuhd4P=R3@HpP3{eazjKK_=Ovy|zML-(FW(MNV z0zhIqLk&X>V-+_8LoHJc6HqOq-%18e=36XzrMZS+(&!djQEG8%PDwFHlY)Z6FVkeJ zn9$`R!y@JYH zd>~FrYCO>7B%tOZ4xn)$Hy4B4(ZFznS8#$$XLN(x4Q{~(-_JlX20u+ku&N@E%|)Cb qf*nZw;;_lhPbtkwwJQRJ2G|TaAmalwBO~JnCMHIq4-A+DSU&)^d`b2I 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', +)