matekit 1.0.3__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.
- matekit-1.0.3/PKG-INFO +5 -0
- matekit-1.0.3/matekit/CLI.PY +39 -0
- matekit-1.0.3/matekit/__init__.py +11 -0
- matekit-1.0.3/matekit/algebra.py +20 -0
- matekit-1.0.3/matekit/aritmetica.py +39 -0
- matekit-1.0.3/matekit/calculadora.py +26 -0
- matekit-1.0.3/matekit/calculo.py +2 -0
- matekit-1.0.3/matekit/conversiones.py +11 -0
- matekit-1.0.3/matekit/estadistica.py +11 -0
- matekit-1.0.3/matekit/fisica.py +8 -0
- matekit-1.0.3/matekit/geometria.py +16 -0
- matekit-1.0.3/matekit/graficas.py +14 -0
- matekit-1.0.3/matekit/lineal.py +8 -0
- matekit-1.0.3/matekit/trigonometria.py +16 -0
- matekit-1.0.3/matekit.egg-info/PKG-INFO +5 -0
- matekit-1.0.3/matekit.egg-info/SOURCES.txt +19 -0
- matekit-1.0.3/matekit.egg-info/dependency_links.txt +1 -0
- matekit-1.0.3/matekit.egg-info/entry_points.txt +2 -0
- matekit-1.0.3/matekit.egg-info/top_level.txt +1 -0
- matekit-1.0.3/pyproject.toml +14 -0
- matekit-1.0.3/setup.cfg +4 -0
matekit-1.0.3/PKG-INFO
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: matekit
|
|
3
|
+
Version: 1.0.3
|
|
4
|
+
Summary: Matekit is a modern Python mathematics library designed to make calculations, graphing, algebra, geometry, statistics, and mathematical utilities simple and powerful. It provides an easy-to-use API for students, developers, and anyone working with mathematics in Python.
|
|
5
|
+
Author: Nico
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import sys
|
|
2
|
+
import inspect
|
|
3
|
+
import matekit
|
|
4
|
+
|
|
5
|
+
def main():
|
|
6
|
+
if len(sys.argv) < 2:
|
|
7
|
+
print("Uso: matekit <funcion> [argumentos]")
|
|
8
|
+
return
|
|
9
|
+
|
|
10
|
+
nombre_funcion = sys.argv[1]
|
|
11
|
+
|
|
12
|
+
# Verifica si la función existe
|
|
13
|
+
if not hasattr(matekit, nombre_funcion):
|
|
14
|
+
print(f"La funcion '{nombre_funcion}' no existe.")
|
|
15
|
+
return
|
|
16
|
+
|
|
17
|
+
funcion = getattr(matekit, nombre_funcion)
|
|
18
|
+
|
|
19
|
+
# Verifica que sea función
|
|
20
|
+
if not callable(funcion):
|
|
21
|
+
print(f"'{nombre_funcion}' no es una funcion.")
|
|
22
|
+
return
|
|
23
|
+
|
|
24
|
+
try:
|
|
25
|
+
# Convierte argumentos a float
|
|
26
|
+
args = [float(arg) for arg in sys.argv[2:]]
|
|
27
|
+
|
|
28
|
+
resultado = funcion(*args)
|
|
29
|
+
|
|
30
|
+
print(resultado)
|
|
31
|
+
|
|
32
|
+
except TypeError:
|
|
33
|
+
print("Cantidad de argumentos incorrecta.")
|
|
34
|
+
|
|
35
|
+
except ValueError:
|
|
36
|
+
print("Los argumentos deben ser numeros.")
|
|
37
|
+
|
|
38
|
+
if __name__ == "__main__":
|
|
39
|
+
main()
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
from .aritmetica import *
|
|
2
|
+
from .algebra import *
|
|
3
|
+
from .lineal import *
|
|
4
|
+
from .trigonometria import *
|
|
5
|
+
from .calculo import *
|
|
6
|
+
from .geometria import *
|
|
7
|
+
from .estadistica import *
|
|
8
|
+
from .fisica import *
|
|
9
|
+
from .conversiones import *
|
|
10
|
+
from .graficas import *
|
|
11
|
+
from .calculadora import *
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import math
|
|
2
|
+
|
|
3
|
+
def ecuacion_lineal(a, b):
|
|
4
|
+
return -b / a
|
|
5
|
+
|
|
6
|
+
def bhaskara(a, b, c):
|
|
7
|
+
d = b**2 - 4*a*c
|
|
8
|
+
|
|
9
|
+
x1 = (-b + math.sqrt(d)) / (2*a)
|
|
10
|
+
x2 = (-b - math.sqrt(d)) / (2*a)
|
|
11
|
+
|
|
12
|
+
return x1, x2
|
|
13
|
+
|
|
14
|
+
def sistema_2x2(a1, b1, c1, a2, b2, c2):
|
|
15
|
+
det = a1*b2 - a2*b1
|
|
16
|
+
|
|
17
|
+
x = (c1*b2 - c2*b1) / det
|
|
18
|
+
y = (a1*c2 - a2*c1) / det
|
|
19
|
+
|
|
20
|
+
return x, y
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
def suma(a, b):
|
|
2
|
+
return a + b
|
|
3
|
+
|
|
4
|
+
def resta(a, b):
|
|
5
|
+
return a - b
|
|
6
|
+
|
|
7
|
+
def multiplicar(a, b):
|
|
8
|
+
return a * b
|
|
9
|
+
|
|
10
|
+
def dividir(a, b):
|
|
11
|
+
if b == 0:
|
|
12
|
+
return "No se puede dividir entre 0"
|
|
13
|
+
|
|
14
|
+
return a / b
|
|
15
|
+
|
|
16
|
+
def potencia(a, b):
|
|
17
|
+
return a ** b
|
|
18
|
+
|
|
19
|
+
def raiz(a):
|
|
20
|
+
return a ** 0.5
|
|
21
|
+
|
|
22
|
+
def factorial(n):
|
|
23
|
+
if n == 0:
|
|
24
|
+
return 1
|
|
25
|
+
|
|
26
|
+
return n * factorial(n - 1)
|
|
27
|
+
|
|
28
|
+
def es_par(n):
|
|
29
|
+
return n % 2 == 0
|
|
30
|
+
|
|
31
|
+
def es_primo(n):
|
|
32
|
+
if n < 2:
|
|
33
|
+
return False
|
|
34
|
+
|
|
35
|
+
for i in range(2, int(n ** 0.5) + 1):
|
|
36
|
+
if n % i == 0:
|
|
37
|
+
return False
|
|
38
|
+
|
|
39
|
+
return True
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import math
|
|
2
|
+
|
|
3
|
+
def calc():
|
|
4
|
+
print("=== Matekit Calculator ===")
|
|
5
|
+
print("Type 'exit' to quit")
|
|
6
|
+
|
|
7
|
+
allowed = {}
|
|
8
|
+
|
|
9
|
+
# Agrega funciones matemáticas
|
|
10
|
+
for name in dir(math):
|
|
11
|
+
if not name.startswith("_"):
|
|
12
|
+
allowed[name] = getattr(math, name)
|
|
13
|
+
|
|
14
|
+
while True:
|
|
15
|
+
expr = input(">>> ")
|
|
16
|
+
|
|
17
|
+
if expr.lower() == "exit":
|
|
18
|
+
print("Goodbye!")
|
|
19
|
+
break
|
|
20
|
+
|
|
21
|
+
try:
|
|
22
|
+
result = eval(expr, {"__builtins__": {}}, allowed)
|
|
23
|
+
print(result)
|
|
24
|
+
|
|
25
|
+
except Exception as e:
|
|
26
|
+
print("Error:", e)
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
PI = 3.1416
|
|
2
|
+
|
|
3
|
+
def area_circulo(r):
|
|
4
|
+
return PI * r * r
|
|
5
|
+
|
|
6
|
+
def perimetro_circulo(r):
|
|
7
|
+
return 2 * PI * r
|
|
8
|
+
|
|
9
|
+
def area_rectangulo(base, altura):
|
|
10
|
+
return base * altura
|
|
11
|
+
|
|
12
|
+
def area_triangulo(base, altura):
|
|
13
|
+
return (base * altura) / 2
|
|
14
|
+
|
|
15
|
+
def volumen_cubo(lado):
|
|
16
|
+
return lado ** 3
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: matekit
|
|
3
|
+
Version: 1.0.3
|
|
4
|
+
Summary: Matekit is a modern Python mathematics library designed to make calculations, graphing, algebra, geometry, statistics, and mathematical utilities simple and powerful. It provides an easy-to-use API for students, developers, and anyone working with mathematics in Python.
|
|
5
|
+
Author: Nico
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
pyproject.toml
|
|
2
|
+
matekit/CLI.PY
|
|
3
|
+
matekit/__init__.py
|
|
4
|
+
matekit/algebra.py
|
|
5
|
+
matekit/aritmetica.py
|
|
6
|
+
matekit/calculadora.py
|
|
7
|
+
matekit/calculo.py
|
|
8
|
+
matekit/conversiones.py
|
|
9
|
+
matekit/estadistica.py
|
|
10
|
+
matekit/fisica.py
|
|
11
|
+
matekit/geometria.py
|
|
12
|
+
matekit/graficas.py
|
|
13
|
+
matekit/lineal.py
|
|
14
|
+
matekit/trigonometria.py
|
|
15
|
+
matekit.egg-info/PKG-INFO
|
|
16
|
+
matekit.egg-info/SOURCES.txt
|
|
17
|
+
matekit.egg-info/dependency_links.txt
|
|
18
|
+
matekit.egg-info/entry_points.txt
|
|
19
|
+
matekit.egg-info/top_level.txt
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
matekit
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=61.0"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "matekit"
|
|
7
|
+
version = "1.0.3"
|
|
8
|
+
description = "Matekit is a modern Python mathematics library designed to make calculations, graphing, algebra, geometry, statistics, and mathematical utilities simple and powerful. It provides an easy-to-use API for students, developers, and anyone working with mathematics in Python."
|
|
9
|
+
authors = [
|
|
10
|
+
{name = "Nico"}
|
|
11
|
+
]
|
|
12
|
+
|
|
13
|
+
[project.scripts]
|
|
14
|
+
matekit = "matekit.cli:main"
|
matekit-1.0.3/setup.cfg
ADDED