From 1b780202f5c5a116ba8cbec12b86bb2fe72dd75d Mon Sep 17 00:00:00 2001 From: Pedro Rolon Date: Tue, 16 Oct 2018 08:57:13 -0300 Subject: [PATCH] Se agregaron los archivos correspondientes a la tarea! --- README.md | 5 +++++ cuestionario/cuestionario.js | 46 ++++++++++++++++++++++++++++++++++++++++++++++ ejercicios/calculadora.html | 136 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ejercicios/dados/1.png | Bin 0 -> 2881 bytes ejercicios/dados/2.png | Bin 0 -> 3791 bytes ejercicios/dados/3.png | Bin 0 -> 5117 bytes ejercicios/dados/4.png | Bin 0 -> 6262 bytes ejercicios/dados/5.png | Bin 0 -> 7551 bytes ejercicios/dados/6.png | Bin 0 -> 8761 bytes ejercicios/dados/unset.jpg | Bin 0 -> 35145 bytes ejercicios/recursos/casino.jpg | Bin 0 -> 1500412 bytes ejercicios/recursos/einstein.jpg | Bin 0 -> 215775 bytes ejercicios/recursos/tirar_dados.jpeg | Bin 0 -> 4211 bytes ejercicios/tirando_dados.html | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 14 files changed, 233 insertions(+) create mode 100644 README.md create mode 100644 cuestionario/cuestionario.js create mode 100644 ejercicios/calculadora.html create mode 100644 ejercicios/dados/1.png create mode 100644 ejercicios/dados/2.png create mode 100644 ejercicios/dados/3.png create mode 100644 ejercicios/dados/4.png create mode 100644 ejercicios/dados/5.png create mode 100644 ejercicios/dados/6.png create mode 100644 ejercicios/dados/unset.jpg create mode 100644 ejercicios/recursos/casino.jpg create mode 100644 ejercicios/recursos/einstein.jpg create mode 100644 ejercicios/recursos/tirar_dados.jpeg create mode 100644 ejercicios/tirando_dados.html diff --git a/README.md b/README.md new file mode 100644 index 0000000..6adfd7e --- /dev/null +++ b/README.md @@ -0,0 +1,5 @@ +# Instrucciones e Informaciones + +* El cuestionario y los ejercicios están divididos en carpetas +* La calculadora funciona correcamente con operaciones básicas entre dos números, no está preparada para resolver operaciones combinadas +* Dentro de la carpeta **ejercicios** se encuentra una carpeta **recursos** que contiene solo las imágenes que se utilizan. \ No newline at end of file diff --git a/cuestionario/cuestionario.js b/cuestionario/cuestionario.js new file mode 100644 index 0000000..d1a4d6f --- /dev/null +++ b/cuestionario/cuestionario.js @@ -0,0 +1,46 @@ +//CUESTIONARIO + +/***1. Escribir una función en JavaScript que calcule la versión +que suma en la ecuación cuadrática***/ +function cuadratica_suma(a, b, c){ + return ( (-b) + (((b**2)-(4*a*c))**0.5)) / (2*a); +} + +/***2. Escribir una función en JavaScript que calcule la versión +que resta en la ecuación cuadrática***/ +function cuadratica_resta(a, b, c){ + return ( (-b) - (((b**2)-(4*a*c))**0.5)) / (2*a); +} + +/*** 3. Escribir una función en JavaScript que reciba un id y un string y ponga como innerHTML del elemento +con el id referenciado el valor del string ***/ +function setInnerById(p_id, nuevo_inner){ + document.getElementById(p_id).innerHTML = nuevo_inner; +} + +/*** 4. Escribir una función en JavaScript que reciba un id, y ponga en el innerHTML del elemento con el id +referenciado un número aleatorio entre 1 y 100 ***/ +function aleatorio(limite_inferior, limite_superior) { + return Math.round(Math.random() * (limite_superior - limite_inferior) + limite_inferior); +} +function setInnerById(p_id){ + document.getElementById(p_id).innerHTML = aleatorio(1,100); +} + +/*** 5. Qué significa que las funciones son ciudadanos de primera categoría en JavaScript? Pueden dar algún +ejemplo de ello? ***/ +/** Significa que las funciones pueden ser tratadas como variables, es decir, pueden pasarse como parámetro a otra función, + * puede ser retornada por otra función o puede ser asignada a una variable + **/ + + //recibe como parámetro una variable, que luego será ejecutada como una función + function primero(funcion){ + console.log("primero primero"); + funcion(); + } + function segundo(){ + console.log("segundo segundo"); + } + //La función "segundo" es enviada como parámetro a la función "primero" + primero(segundo); + diff --git a/ejercicios/calculadora.html b/ejercicios/calculadora.html new file mode 100644 index 0000000..33ed50a --- /dev/null +++ b/ejercicios/calculadora.html @@ -0,0 +1,136 @@ + + + Calculadora + + + + +
+ + + + + + + + + + + + + + +
+ + + + +
+ + + + +
+ + + + +
+ + + + +
+ + +
+ + + \ No newline at end of file diff --git a/ejercicios/dados/1.png b/ejercicios/dados/1.png new file mode 100644 index 0000000..629c150 Binary files /dev/null and b/ejercicios/dados/1.png differ diff --git a/ejercicios/dados/2.png b/ejercicios/dados/2.png new file mode 100644 index 0000000..bc32d7e Binary files /dev/null and b/ejercicios/dados/2.png differ diff --git a/ejercicios/dados/3.png b/ejercicios/dados/3.png new file mode 100644 index 0000000..6cd65d4 Binary files /dev/null and b/ejercicios/dados/3.png differ diff --git a/ejercicios/dados/4.png b/ejercicios/dados/4.png new file mode 100644 index 0000000..880dcf9 Binary files /dev/null and b/ejercicios/dados/4.png differ diff --git a/ejercicios/dados/5.png b/ejercicios/dados/5.png new file mode 100644 index 0000000..3bad55c Binary files /dev/null and b/ejercicios/dados/5.png differ diff --git a/ejercicios/dados/6.png b/ejercicios/dados/6.png new file mode 100644 index 0000000..e5f0cac Binary files /dev/null and b/ejercicios/dados/6.png differ diff --git a/ejercicios/dados/unset.jpg b/ejercicios/dados/unset.jpg new file mode 100644 index 0000000..d4f8cd8 Binary files /dev/null and b/ejercicios/dados/unset.jpg differ diff --git a/ejercicios/recursos/casino.jpg b/ejercicios/recursos/casino.jpg new file mode 100644 index 0000000..12154ab Binary files /dev/null and b/ejercicios/recursos/casino.jpg differ diff --git a/ejercicios/recursos/einstein.jpg b/ejercicios/recursos/einstein.jpg new file mode 100644 index 0000000..ac0fcb8 Binary files /dev/null and b/ejercicios/recursos/einstein.jpg differ diff --git a/ejercicios/recursos/tirar_dados.jpeg b/ejercicios/recursos/tirar_dados.jpeg new file mode 100644 index 0000000..a64ad87 Binary files /dev/null and b/ejercicios/recursos/tirar_dados.jpeg differ diff --git a/ejercicios/tirando_dados.html b/ejercicios/tirando_dados.html new file mode 100644 index 0000000..79d3e48 --- /dev/null +++ b/ejercicios/tirando_dados.html @@ -0,0 +1,46 @@ + + + + Tirando Dados + + + + + + + + + + + +
+
+ + + \ No newline at end of file -- libgit2 0.26.0