diff --git a/02-JS-I/homework/homework.js b/02-JS-I/homework/homework.js index 3c92ac9cdf..d898e30fd0 100644 --- a/02-JS-I/homework/homework.js +++ b/02-JS-I/homework/homework.js @@ -1,22 +1,22 @@ // En estas primeras 6 preguntas, reemplaza `null` por la respuesta // Crea una variable "string", puede contener lo que quieras: -const nuevaString = null; +const nuevaString = 'hola'; // Crea una variable numérica, puede ser cualquier número: -const nuevoNum = null; +const nuevoNum = 33; // Crea una variable booleana: -const nuevoBool = null; +const nuevoBool = true; // Resuelve el siguiente problema matemático: -const nuevaResta = 10 - null === 5; +const nuevaResta = 10 - 5 === 5; // Resuelve el siguiente problema matemático: -const nuevaMultiplicacion = 10 * null === 40 ; +const nuevaMultiplicacion = 10 * 4 === 40 ; // Resuelve el siguiente problema matemático: -const nuevoModulo = 21 % 5 === null; +const nuevoModulo = 21 % 5 === 1; // En los próximos 22 problemas, deberás completar la función. @@ -28,117 +28,145 @@ const nuevoModulo = 21 % 5 === null; function devolverString(str) { // "Return" la string provista: str // Tu código: - + return str; } function suma(x, y) { // "x" e "y" son números // Suma "x" e "y" juntos y devuelve el valor // Tu código: - +var sum= x + y +return sum; + } function resta(x, y) { // Resta "y" de "x" y devuelve el valor // Tu código: - + var rest= x - y +return rest; } function multiplica(x, y) { // Multiplica "x" por "y" y devuelve el valor // Tu código: - + var mult= x * y +return mult; } function divide(x, y) { // Divide "x" entre "y" y devuelve el valor // Tu código: - + return x / y } function sonIguales(x, y) { // Devuelve "true" si "x" e "y" son iguales // De lo contrario, devuelve "false" // Tu código: - + if (x===y){ + return true + } else { + return false; + } } function tienenMismaLongitud(str1, str2) { // Devuelve "true" si las dos strings tienen la misma longitud // De lo contrario, devuelve "false" // Tu código: - + if (str1.length===str2.length){ + return true + } else { + return false; + } } function menosQueNoventa(num) { // Devuelve "true" si el argumento de la función "num" es menor que noventa // De lo contrario, devuelve "false" // Tu código: - + if (num<90){ + return true + } else { + return false; + } } function mayorQueCincuenta(num) { // Devuelve "true" si el argumento de la función "num" es mayor que cincuenta // De lo contrario, devuelve "false" // Tu código: - + if (num>50){ + return true + } else { + return false; + } } function obtenerResto(x, y) { // Obten el resto de la división de "x" entre "y" // Tu código: - + return x % y } function esPar(num) { // Devuelve "true" si "num" es par // De lo contrario, devuelve "false" // Tu código: - + if (num%2===0){ + return true + } else { + return false; + } } function esImpar(num) { // Devuelve "true" si "num" es impar // De lo contrario, devuelve "false" // Tu código: - + if (num%2!=0){ + return true + } else { + return false; + } } function elevarAlCuadrado(num) { // Devuelve el valor de "num" elevado al cuadrado // ojo: No es raiz cuadrada! // Tu código: - + return Math.pow(num,2); } function elevarAlCubo(num) { // Devuelve el valor de "num" elevado al cubo // Tu código: - + return Math.pow(num,3); } function elevar(num, exponent) { // Devuelve el valor de "num" elevado al exponente dado en "exponent" // Tu código: - + return Math.pow(num,exponent); } function redondearNumero(num) { // Redondea "num" al entero más próximo y devuélvelo // Tu código: - + return Math.round(num); } function redondearHaciaArriba(num) { // Redondea "num" hacia arriba (al próximo entero) y devuélvelo // Tu código: - + return Math.ceil(num); } function numeroRandom() { //Generar un número al azar entre 0 y 1 y devolverlo //Pista: investigá qué hace el método Math.random() - + return Math.random() } function esPositivo(numero) { @@ -146,55 +174,63 @@ function esPositivo(numero) { //Si el número es positivo, devolver ---> "Es positivo" //Si el número es negativo, devolver ---> "Es negativo" //Si el número es 0, devuelve false - -} + if (numero===0) { + return false; + } + else if (numero>0){ + return "Es positivo"; + } + else { + return "Es negativo"; + } + } + function agregarSimboloExclamacion(str) { // Agrega un símbolo de exclamación al final de la string "str" y devuelve una nueva string // Ejemplo: "hello world" pasaría a ser "hello world!" // Tu código: + return str + "!"; } function combinarNombres(nombre, apellido) { // Devuelve "nombre" y "apellido" combinados en una string y separados por un espacio. - // Ejemplo: "Soy", "Henry" -> "Soy Henry" + //Ejemplo: "Soy", "Henry" -> "Soy Henry" // Tu código: - + return nombre + " " + apellido; } function obtenerSaludo(nombre) { // Toma la string "nombre" y concatena otras string en la cadena para que tome la siguiente forma: // "Martin" -> "Hola Martin!" // Tu código: - + return "Hola " + nombre + "!"; } function obtenerAreaRectangulo(alto, ancho) { // Retornar el area de un rectángulo teniendo su altura y ancho // Tu código: - + return alto * ancho } function retornarPerimetro(lado){ //Escibe una función a la cual reciba el valor del lado de un cuadrado y retorne su perímetro. //Escribe tu código aquí - + return lado * 4 } function areaDelTriangulo(base, altura){ //Desarrolle una función que calcule el área de un triángulo. //Escribe tu código aquí - +return ((base*altura)/2) } - - function deEuroAdolar(euro){ //Supongamos que 1 euro equivale a 1.20 dólares. Escribe un programa que reciba //como parámetro un número de euros y calcule el cambio en dólares. //Escribe tu código aquí - + return (euro * 1.20); } @@ -204,7 +240,14 @@ function esVocal(letra){ //que no se puede procesar el dato mediante el mensaje "Dato incorrecto". // Si no es vocal, tambien debe devolver "Dato incorrecto". //Escribe tu código aquí - + if (letra.length > 1){ + return "Dato incorrecto"; + } + if (letra ==="a" ||letra ==="e" ||letra ==="i" ||letra ==="o" ||letra ==="u"){ + return "Es vocal" + }else{ + return "Dato incorrecto"; + } } diff --git a/ls b/ls new file mode 100644 index 0000000000..76bcdf9728 --- /dev/null +++ b/ls @@ -0,0 +1,270 @@ +commit 5b83d2e748289a712faf62e961d963dccc25dd54 (HEAD -> main) +Author: JOSEMAARANGE +Date: Wed Nov 9 15:30:02 2022 -0300 + + Subi mi primer cambio + +commit 8ed09e19c8797a3744f5d82dda781220d7b122d4 (origin/main, origin/HEAD) +Author: JOSEMAARANGE +Date: Tue Sep 27 15:56:26 2022 -0300 + + first commit + +commit 681e9300acad7a306ce08d9af75780c558f50ad5 +Author: Ignacio Amatt +Date: Thu Aug 18 10:16:45 2022 -0300 + + git homework added + +commit fc6296ece22eb8509c584076c517deaf1d151dff +Merge: 40f45a5 2386b1a +Author: Ignacio Amatt <83307696+nachovip@users.noreply.github.com> +Date: Thu Aug 18 10:13:12 2022 -0300 + + Merge pull request #47 from franco-ibanez-dev/main + + Update README.md + +commit 2386b1aa3843333a2cb0ef5246dbde81f8987bc2 +Author: Franco Ezequiel Ibañez +Date: Thu Aug 18 09:16:14 2022 -0300 + + Update README.md + + Estos son las urls que coinciden con las localizaciones actuales de las respectivas imágenes. + +commit 40f45a588e1032d7e284d62450b347481211985a +Author: Ignacio Amatt +Date: Tue Aug 16 18:33:49 2022 -0300 + + small fixes + +commit 5971e44b304cbbe3b5633e5a793cde303e371831 +Merge: 39735e2 06130aa +Author: Ignacio Amatt <83307696+nachovip@users.noreply.github.com> +Date: Fri Aug 12 15:53:38 2022 -0300 + + Merge pull request #42 from soyHenry/feat/robots_&_sitemap_files + + Feat/robots & sitemap files + +commit 06130aa4fb939190c5b2c74854fa6e854754ad6f +Author: Gabriel Pereyra <69526551+pereyrago@users.noreply.github.com> +Date: Fri Aug 12 14:14:40 2022 -0300 + + feat(app): add sitemap file + +commit 8170b02017a9b9816f0eb19931814fb8102aedbc +Author: Gabriel Pereyra <69526551+pereyrago@users.noreply.github.com> +Date: Fri Aug 12 14:14:28 2022 -0300 + + feat(app): add robots file + +commit b5ac285c8b6b36c6e7ecbb8dfa7fdd259181100b +Author: Gabriel Pereyra <69526551+pereyrago@users.noreply.github.com> +Date: Fri Aug 12 14:12:43 2022 -0300 + + feat(layouts): add new layout empty + +commit 39735e275963a5eed311fcf30c690de02ebfea90 +Merge: 43735a5 7873ca5 +Author: Gabriel Pereyra <69526551+pereyrago@users.noreply.github.com> +Date: Wed Jun 29 17:43:30 2022 -0300 + + Merge pull request #20 from soyHenry/fix/calendar_redirect + + feat(prep): add path /Calendario + +commit 7873ca54572c2a62ab1c52e9ada81a748bb951d7 +Author: Gabriel Pereyra <69526551+pereyrago@users.noreply.github.com> +Date: Wed Jun 29 16:43:31 2022 -0300 + + feat(prep): add path /Calendario + + add page Calendario + +commit 43735a5d20ff97f94273fff3c4651a481e28eec2 +Merge: ca1d61a fa114b0 +Author: Gabriel Pereyra <69526551+pereyrago@users.noreply.github.com> +Date: Thu Jun 23 17:12:04 2022 -0300 + + Merge pull request #17 from soyHenry/fix/wording_challenge_page + + fix(challenge): wording changes + +commit fa114b09ded980af8118fca571d00f1c190377c2 +Author: Gabriel Pereyra <69526551+pereyrago@users.noreply.github.com> +Date: Thu Jun 23 17:08:37 2022 -0300 + + fix(challenge): wording changes + +commit ca1d61ae43d59fb615e2278f77ab00cbbd3a3f19 +Merge: 20e8b19 c65ccb4 +Author: Ignacio Amatt <83307696+nachovip@users.noreply.github.com> +Date: Thu Jun 23 14:57:38 2022 -0300 + + Merge pull request #16 from soyHenry/fix/challenge_inscription_url + + fix(challenge): change url for Challenge + +commit c65ccb49bcafc19437c8cd0cada5fe6a8b5a232a +Author: Gabriel Pereyra <69526551+pereyrago@users.noreply.github.com> +Date: Thu Jun 23 13:40:30 2022 -0300 + + Update README.md + + prettier + +commit 4697b6561a5465138edf3d063f8504a97be7ae1c +Author: Gabriel Pereyra <69526551+pereyrago@users.noreply.github.com> +Date: Thu Jun 23 13:20:50 2022 -0300 + + fix(challenge): change url for Challenge + +commit 20e8b19c776e29c5419aa1db3f4085cb5a1bc3be +Author: Ignacio Amatt <83307696+nachovip@users.noreply.github.com> +Date: Fri Jun 17 17:16:48 2022 -0300 + + Update README.md + +commit b76728aa0051faaf9cd0c7478e0b11e602619efd +Author: Ignacio Amatt +Date: Wed Jun 15 09:27:50 2022 -0300 + + Update README.md + +commit eb0d802798a8e2cdee432500ee91496c6246081d +Author: Ignacio Amatt +Date: Wed Jun 15 09:19:50 2022 -0300 + + Update README.md + +commit d6fe6f981d833d3d6f253bdd70632030cd386cf5 +Author: Ignacio Amatt +Date: Wed Jun 15 09:19:14 2022 -0300 + + Update README.md + +commit 0ea1f08aedb22602261df12bf2303eaa814b0759 +Merge: fa9f4d0 14ace95 +Author: Matias Lamela <63545306+matiaslamela@users.noreply.github.com> +Date: Mon May 16 13:45:26 2022 -0300 + + Merge pull request #4 from GustavoMartinezFS/patch-1 + + Update repository name + +commit 14ace95de02993a1bdb3d16c0d826cc797d9c3f9 +Author: Gustavo Martinez Trejo +Date: Wed May 11 13:14:59 2022 -0300 + + Update repository name + +commit fa9f4d05ac9e23f87a96e7707c7c30857ce92339 +Author: Ignacio Amatt +Date: Tue Apr 19 14:28:39 2022 -0300 + + linting + +commit 5ff9713ed076afbcbcdafc78efad4a0aefd6cc9b +Author: Ignacio Amatt +Date: Tue Apr 19 14:28:24 2022 -0300 + + linting + +commit 738ebbef6bd5b6813bf928812751cca04d16e841 +Author: Ignacio Amatt +Date: Tue Apr 19 09:54:57 2022 -0300 + + ssl update + +commit ed7e3ba353adf61614bbd923eb8d26673e7d0243 +Author: Ignacio Amatt +Date: Tue Apr 19 09:53:05 2022 -0300 + + url fixed + +commit ccc537d381fb636a0474e4a9a6fb8107f16be95b +Merge: 5a22251 8ffbe05 +Author: Ignacio Amatt <83307696+nachovip@users.noreply.github.com> +Date: Mon Apr 18 13:56:58 2022 -0300 + + Merge pull request #64 from soyHenry/updates_23.03 + + Updates 23.03 + +commit 8ffbe05ffdeafc3e713067932336c09aad494f6c +Merge: ee6b17e 5a22251 +Author: Ignacio Amatt <83307696+nachovip@users.noreply.github.com> +Date: Mon Apr 18 13:54:00 2022 -0300 + + Merge branch 'main' into updates_23.03 + +commit ee6b17e423d6e2fd1238f7568371dd3953c5bb8e +Author: Ignacio Amatt +Date: Mon Apr 18 12:03:32 2022 -0300 + + updates 2303 + +commit 5a222511192a281fec29a71b508e7f9dfb676357 +Author: Ignacio Amatt +Date: Fri Apr 8 18:26:06 2022 -0300 + + Create .eleventyignore + +commit 5c082d8d0bd067e1eab5fc2b9a1b24ed1a8e81db +Author: Ignacio Amatt +Date: Fri Apr 8 17:53:14 2022 -0300 + + Create .eleventyignore + +commit f1e01ecc16b7550fcb3d3b3cffaef50558b5aad9 +Author: Ignacio Amatt +Date: Tue Apr 5 09:20:46 2022 -0300 + + Update README.md + +commit ba6a20de8f04ca5935aa389631f3ddbfde5affc5 +Author: Ignacio Amatt +Date: Mon Apr 4 16:03:33 2022 -0300 + + OpenHouse added + +commit c975e986620a729900b2f9934c07b1cd4f48355f +Author: Ignacio Amatt +Date: Mon Apr 4 15:52:52 2022 -0300 + + refactor + +commit 00a2dce1148762c85c0bd38e9c64b26691aa2faa +Author: Ignacio Amatt +Date: Mon Apr 4 13:02:52 2022 -0300 + + Update README.md + +commit a45b7303ee1489f33112563cd51914a512f2ac3a +Author: Ignacio Amatt +Date: Mon Apr 4 12:57:28 2022 -0300 + + Update README.md + +commit a4e5c41e16d03468ec86622a6dacba7855cda29a +Author: Ignacio Amatt +Date: Mon Apr 4 12:51:32 2022 -0300 + + refactor + +commit 88cc371a75f3666b13bbef2d68c32d339545b8bf +Author: Ignacio Amatt +Date: Mon Apr 4 12:41:13 2022 -0300 + + refactor + +commit e46bcbba8275a76bd459335c762b4bd528725c4a +Author: Ignacio Amatt +Date: Tue Feb 1 17:35:58 2022 -0300 + + CloudFront url update + +commit f0d633e08e028170e84522f0e37fcc3d9c73eb05 +Author: Ignacio Amatt