diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7e99e36 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*.pyc \ No newline at end of file diff --git a/sp1/a11g1.py b/sp1/a11g1.py new file mode 100644 index 0000000..15fa54d --- /dev/null +++ b/sp1/a11g1.py @@ -0,0 +1,19 @@ +# App A11G1 + +# Importamos la función bienvenida +from funciones.bienvenida import bienvenida +from funciones.ing2i import ing2i +from funciones.ing2s import ing2s +from funciones.resta import resta +from funciones.potencia import potencia +from funciones.p1sum import p1sum + + + +bienvenida() + +enteros = ing2i() +print('Los enteros intresados son: ', enteros[0], enteros[1]) + +cadenas = ing2s() +print('Los strings intresados son: ', cadenas[0], cadenas[1]) \ No newline at end of file diff --git a/sp1/funciones/bienvenida.py b/sp1/funciones/bienvenida.py new file mode 100644 index 0000000..e14f7ac --- /dev/null +++ b/sp1/funciones/bienvenida.py @@ -0,0 +1,2 @@ +def bienvenida(): + print("*Bienvenidos, esta es la aplicación A11G1*") \ No newline at end of file diff --git a/sp1/funciones/cociente.py b/sp1/funciones/cociente.py new file mode 100644 index 0000000..2dab7ee --- /dev/null +++ b/sp1/funciones/cociente.py @@ -0,0 +1,2 @@ +def cociente(param1, param2): + return param1/param2 diff --git a/sp1/funciones/genrnd.py b/sp1/funciones/genrnd.py new file mode 100644 index 0000000..878103f --- /dev/null +++ b/sp1/funciones/genrnd.py @@ -0,0 +1,8 @@ +import random + +def genrnd(): + lista= [] + for i in range(0,50): + i = random.randint(0,50) + lista.append(i) + return(lista) \ No newline at end of file diff --git a/sp1/funciones/ing2i.py b/sp1/funciones/ing2i.py new file mode 100644 index 0000000..8a186f3 --- /dev/null +++ b/sp1/funciones/ing2i.py @@ -0,0 +1,5 @@ +#permita el ingreso de 2 valores enteros. +def ing2i(): + i1 = int(input("Ingrese el primer entero: ")) + i2 = int(input("Ingrese el segundo entero: ")) + return [i1, i2] diff --git a/sp1/funciones/ing2s.py b/sp1/funciones/ing2s.py new file mode 100644 index 0000000..bec3847 --- /dev/null +++ b/sp1/funciones/ing2s.py @@ -0,0 +1,4 @@ +def ing2s(): + s1 = input() + s2 = input() + return [s1, s2] \ No newline at end of file diff --git a/sp1/funciones/p1sum.py b/sp1/funciones/p1sum.py new file mode 100644 index 0000000..764095d --- /dev/null +++ b/sp1/funciones/p1sum.py @@ -0,0 +1,4 @@ +from funciones.suma import suma + +def p1sum (param1, param2, param3): + return suma(suma(param1,param2), param3) \ No newline at end of file diff --git a/sp1/funciones/potencia.py b/sp1/funciones/potencia.py new file mode 100644 index 0000000..eb5a79b --- /dev/null +++ b/sp1/funciones/potencia.py @@ -0,0 +1,2 @@ +def potencia (num1, num2): + return num1 ** num2 \ No newline at end of file diff --git a/sp1/funciones/resta.py b/sp1/funciones/resta.py new file mode 100644 index 0000000..5988174 --- /dev/null +++ b/sp1/funciones/resta.py @@ -0,0 +1,2 @@ +def resta(param1, param2): + return param1-param2 \ No newline at end of file diff --git a/sp1/funciones/suma.py b/sp1/funciones/suma.py new file mode 100644 index 0000000..75710ee --- /dev/null +++ b/sp1/funciones/suma.py @@ -0,0 +1,2 @@ +def suma(param1, param2): + return param1+param2 \ No newline at end of file