manojcalculator 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- manojcalculator-0.1.0/PKG-INFO +22 -0
- manojcalculator-0.1.0/README.md +14 -0
- manojcalculator-0.1.0/manojcalculator/__init__.py +43 -0
- manojcalculator-0.1.0/manojcalculator.egg-info/PKG-INFO +22 -0
- manojcalculator-0.1.0/manojcalculator.egg-info/SOURCES.txt +7 -0
- manojcalculator-0.1.0/manojcalculator.egg-info/dependency_links.txt +1 -0
- manojcalculator-0.1.0/manojcalculator.egg-info/top_level.txt +1 -0
- manojcalculator-0.1.0/pyproject.toml +13 -0
- manojcalculator-0.1.0/setup.cfg +4 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: manojcalculator
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A simple calculator Python package
|
|
5
|
+
Author: Manoj Kumar Giri
|
|
6
|
+
Requires-Python: >=3.8
|
|
7
|
+
Description-Content-Type: text/markdown
|
|
8
|
+
|
|
9
|
+
# Manoj Calculator
|
|
10
|
+
|
|
11
|
+
A simple Python calculator package.
|
|
12
|
+
|
|
13
|
+
## Installation
|
|
14
|
+
|
|
15
|
+
pip install manojcalculator
|
|
16
|
+
|
|
17
|
+
## Usage
|
|
18
|
+
|
|
19
|
+
import manojcalculator
|
|
20
|
+
|
|
21
|
+
print(manojcalculator.add(10, 20))
|
|
22
|
+
print(manojcalculator.subtract(20, 5))
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# ==========================================
|
|
2
|
+
# MyCalculator - Simple Calculator Module
|
|
3
|
+
# ==========================================
|
|
4
|
+
|
|
5
|
+
def add(a, b):
|
|
6
|
+
"""Return the addition of two numbers."""
|
|
7
|
+
return a + b
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def subtract(a, b):
|
|
11
|
+
"""Return the subtraction of two numbers."""
|
|
12
|
+
return a - b
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def multiply(a, b):
|
|
16
|
+
"""Return the multiplication of two numbers."""
|
|
17
|
+
return a * b
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def divide(a, b):
|
|
21
|
+
"""Return the division of two numbers."""
|
|
22
|
+
if b == 0:
|
|
23
|
+
return "Error: Cannot divide by zero"
|
|
24
|
+
return a / b
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def modulus(a, b):
|
|
28
|
+
"""Return the remainder of two numbers."""
|
|
29
|
+
if b == 0:
|
|
30
|
+
return "Error: Cannot divide by zero"
|
|
31
|
+
return a % b
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def power(a, b):
|
|
35
|
+
"""Return a raised to the power of b."""
|
|
36
|
+
return a ** b
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def floor_divide(a, b):
|
|
40
|
+
"""Return floor division of two numbers."""
|
|
41
|
+
if b == 0:
|
|
42
|
+
return "Error: Cannot divide by zero"
|
|
43
|
+
return a // b
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: manojcalculator
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A simple calculator Python package
|
|
5
|
+
Author: Manoj Kumar Giri
|
|
6
|
+
Requires-Python: >=3.8
|
|
7
|
+
Description-Content-Type: text/markdown
|
|
8
|
+
|
|
9
|
+
# Manoj Calculator
|
|
10
|
+
|
|
11
|
+
A simple Python calculator package.
|
|
12
|
+
|
|
13
|
+
## Installation
|
|
14
|
+
|
|
15
|
+
pip install manojcalculator
|
|
16
|
+
|
|
17
|
+
## Usage
|
|
18
|
+
|
|
19
|
+
import manojcalculator
|
|
20
|
+
|
|
21
|
+
print(manojcalculator.add(10, 20))
|
|
22
|
+
print(manojcalculator.subtract(20, 5))
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
manojcalculator
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=61"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "manojcalculator"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
readme = "README.md"
|
|
9
|
+
description = "A simple calculator Python package"
|
|
10
|
+
requires-python = ">=3.8"
|
|
11
|
+
authors = [
|
|
12
|
+
{name = "Manoj Kumar Giri"}
|
|
13
|
+
]
|