From e415cf6e4e3973f9fb60da363e143dfbf7d35c08 Mon Sep 17 00:00:00 2001 From: Chad Grubbs <98975975+Chadmichaelg@users.noreply.github.com> Date: Thu, 18 Aug 2022 15:49:59 -0400 Subject: [PATCH 001/123] Update README.md line 26. Changed the word don't to doesn't --- exercises/06-lambda-functions/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/06-lambda-functions/README.md b/exercises/06-lambda-functions/README.md index 66c8498..dd38458 100755 --- a/exercises/06-lambda-functions/README.md +++ b/exercises/06-lambda-functions/README.md @@ -23,7 +23,7 @@ multiply = lambda p1,p2: p1 * p2 + **Lambda function** can only have one line. -+ **Lambda function** don't need a `return` statement (it is assumed that it will return whatever is on that one line). ++ **Lambda function** doesn't need a `return` statement (it is assumed that it will return whatever is on that one line). + **Lambda functions** can be stored in variables or passed as parameters to another function From abf52130a0f1dba4a33b9adfaf3e89a7f22b924c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Su=C3=A1rez?= <82285542+kiddopro@users.noreply.github.com> Date: Sat, 5 Nov 2022 21:43:22 -0300 Subject: [PATCH 002/123] Update learn.json --- learn.json | 1 + 1 file changed, 1 insertion(+) diff --git a/learn.json b/learn.json index e25dadd..34ad535 100644 --- a/learn.json +++ b/learn.json @@ -6,6 +6,7 @@ "description": "Learn and master functional programing by doing auto-graded interactive exercises.", "duration": 10, "difficulty": "easy", + "projectType": "tutorial", "videoSolutions": true, "bugsLink": "https://github.com/learnpack/learnpack/issues/new", "graded": true, From fbc63cef3014cb8c5edc5d8d9aada0d356a54fe0 Mon Sep 17 00:00:00 2001 From: ErnestoXG Date: Thu, 16 Feb 2023 20:56:51 +0000 Subject: [PATCH 003/123] added solution --- exercises/07-lambda-function-two/solution.hide.py | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 exercises/07-lambda-function-two/solution.hide.py diff --git a/exercises/07-lambda-function-two/solution.hide.py b/exercises/07-lambda-function-two/solution.hide.py new file mode 100644 index 0000000..963f084 --- /dev/null +++ b/exercises/07-lambda-function-two/solution.hide.py @@ -0,0 +1,5 @@ +rapid = lambda myStr: myStr[:-1] + + +# From this line above, plese do not change code below +print(rapid("bob")) #should print bo \ No newline at end of file From f6f360e471969828bfcab6015ff6608e2708e69b Mon Sep 17 00:00:00 2001 From: Tomas Gonzalez <56565994+tommygonzaleza@users.noreply.github.com> Date: Fri, 17 Feb 2023 00:16:43 -0400 Subject: [PATCH 004/123] Update learn.json --- learn.json | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/learn.json b/learn.json index e25dadd..1536874 100644 --- a/learn.json +++ b/learn.json @@ -1,9 +1,15 @@ { - "title": "Learn Python Functions Interactively", + "title": { + "us": "Learn Python Functions Interactively", + "es": "Aprende las funciones de Python Interactivamente" + }, "slug": "python-function-exercises", "repository": "https://github.com/4GeeksAcademy/python-functions-programming-exercises", "preview": "https://github.com/4GeeksAcademy/python-functions-programming-exercises/blob/master/preview.gif?raw=true", - "description": "Learn and master functional programing by doing auto-graded interactive exercises.", + "description": { + "us": "Learn and master functional programing by doing auto-graded interactive exercises.", + "es": "Aprende y domina funciones en Python haciendo ejercicios interactivos y auto-evaluados." + }, "duration": 10, "difficulty": "easy", "videoSolutions": true, From 161612a3e479cdf579f1ec3e7b0bbcaca85f4755 Mon Sep 17 00:00:00 2001 From: Alejandro Sanchez Date: Mon, 13 Mar 2023 12:48:39 -0400 Subject: [PATCH 005/123] Update README.md --- README.md | 55 ++++++++++--------------------------------------------- 1 file changed, 10 insertions(+), 45 deletions(-) diff --git a/README.md b/README.md index 6136c3b..579ddb1 100644 --- a/README.md +++ b/README.md @@ -1,21 +1,10 @@ - - - - -
-

🐍 Python Functions Tutorial and Exercises

-

By @alesanchezr and other contributors at 4Geeks Academy

- - - follow on Twitter - -
- - - - - - - -
-

+ +# 🐍 Python Functions Tutorial and Exercises + +By @alesanchezr and other contributors at 4Geeks Academy + + + Learn and practice Python Functions. You will see the folowing concepts: 1. Declaring a function. @@ -28,42 +17,18 @@ Learn and practice Python Functions. You will see the folowing concepts: 5. Function recursivity, and many other functional concepts. -The entire tutorial is 👆 interactive, ✅ auto-graded and with. 📹 video tutorials. -

-
- -
- - -

📚 Table of contents:

- - - - - - - - - - - - -
1. Python for Beginners
2. Practice Looping Lists and Tuples
3. Practice functions← 🔥 your are here now
4. Master Python (intermediate)
5. Python API Requests
6. What next? Request a new tutorial or collaborate.
We will feature your profile in our list of contributors
+Note: The entire tutorial is 👆 interactive, ✅ auto-graded and with 📹 video tutorials. These exercises were built in collaboration, we need you! If you find any bugs or misspells please contribute and report them. -

+ ## One click installation: -[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io#https://github.com/4GeeksAcademy/python-functions-programming-exercises.git) - +Click in the following links to open immediately in [Codespaces](https://codespaces.new/?repo=4GeeksAcademy/python-functions-programming-exercises) or [Gitpod](https://gitpod.io#https://github.com/4GeeksAcademy/python-functions-programming-exercises.git). ## Local Installation From 982566c4008495670979c4fd252fc0514d09e281 Mon Sep 17 00:00:00 2001 From: Alejandro Sanchez Date: Mon, 13 Mar 2023 12:52:44 -0400 Subject: [PATCH 006/123] Update README.es.md --- README.es.md | 35 +++++++++-------------------------- 1 file changed, 9 insertions(+), 26 deletions(-) diff --git a/README.es.md b/README.es.md index 4ce42a0..35016e9 100644 --- a/README.es.md +++ b/README.es.md @@ -1,19 +1,9 @@ - - - - -
-

🐍 Turorial y Ejercicios sobre Funciones de Python

-

Por @alesanchezr y otros colaboradores at 4Geeks Academy

- - - follow on Twitter - -
- - - - - -
-

+ +# 🐍 Turorial y Ejercicios sobre Funciones de Python +Creado por @alesanchezr y othors contribuyentes en 4Geeks Academy + + + Aprende y practica las funciones de Python. Vas a ver los siguientes conceptos: 1. Declarar una función. @@ -27,15 +17,6 @@ Aprende y practica las funciones de Python. Vas a ver los siguientes conceptos: 5. Recursividad de funciones y muchos otros conceptos funcionales. Todo el tutorial es 👆 interactivo, ✅ calificado automáticamente y con. 📹 videos tutoriales. -

-
- -
- - Estos ejercicios son colaborativos, ¡te necesitamos! Si encuentras algún error o falta de ortografía, por favor contribuye y repórtalo. @@ -43,9 +24,11 @@ Estos ejercicios son colaborativos, ¡te necesitamos! Si encuentras algún error

+ + ## Instalación en un clic: -[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io#https://github.com/4GeeksAcademy/python-functions-programming-exercises.git) +Haz clic en los siguientes enlaces para abrir este tutorial inmediatamente en [Codespaces](https://codespaces.new/?repo=4GeeksAcademy/python-functions-programming-exercises) o [Gitpod](https://gitpod.io#https://github.com/4GeeksAcademy/python-functions-programming-exercises.git). ## Instalación local: From d4d96055f1463c681113b9a9c57cfac28fac87c2 Mon Sep 17 00:00:00 2001 From: Alejandro Sanchez Date: Mon, 13 Mar 2023 12:53:05 -0400 Subject: [PATCH 007/123] Update README.es.md --- README.es.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.es.md b/README.es.md index 35016e9..0eb48fe 100644 --- a/README.es.md +++ b/README.es.md @@ -34,13 +34,13 @@ Haz clic en los siguientes enlaces para abrir este tutorial inmediatamente en [C 1) Asegúrate de instalar [learnpack](https://learnpack.co), `node.js` version 14+ y python version 3+. Este es el comando para instalar learnpack: -``` +```sh $ npm i learnpack -g && learnpack plugins:install learnpack-python ``` 2) Clona o descarga este repositorio. Una vez que termines de descargar, encontrarás un carpeta nueva con un subdirectorio "exercises" que contiene los ejercicios. -``` +```sh $ git clone https://github.com/4GeeksAcademy/python-functions-programming-exercises.git ``` From 46056397e5a28f7ff26ff2ff97611468341c04ae Mon Sep 17 00:00:00 2001 From: Lorenagubaira Date: Tue, 4 Apr 2023 17:08:48 +0000 Subject: [PATCH 008/123] the footnotes were added --- README.es.md | 2 ++ README.md | 2 ++ 2 files changed, 4 insertions(+) diff --git a/README.es.md b/README.es.md index 0eb48fe..b273bd8 100644 --- a/README.es.md +++ b/README.es.md @@ -79,3 +79,5 @@ Este proyecto sigue la especificación [all-contributors](https://github.com/ken ¡Todas las contribuciones son bienvenidas! Este proyecto sigue la especificación [all-contributors](https://github.com/kentcdodds/all-contributors). ¡Todas las contribuciones son bienvenidas! + +Este y otros ejercicios son usados para [aprender a programar](https://4geeksacademy.com/es/aprender-a-programar/aprender-a-programar-desde-cero) por parte de los alumnos de 4Geeks Academy [Coding Bootcamp](https://4geeksacademy.com/us/coding-bootcamp) realizado por [Alejandro Sánchez](https://twitter.com/alesanchezr) y muchos otros contribuyentes. Conoce más sobre nuestros [Curso de Programación](https://4geeksacademy.com/es/curso-de-programacion-desde-cero?lang=es) para convertirte en [Full Stack Developer](https://4geeksacademy.com/es/coding-bootcamps/desarrollador-full-stack/?lang=es), o nuestro [Data Science Bootcamp](https://4geeksacademy.com/es/coding-bootcamps/curso-datascience-machine-learning). \ No newline at end of file diff --git a/README.md b/README.md index 579ddb1..cb29157 100644 --- a/README.md +++ b/README.md @@ -77,3 +77,5 @@ Thanks to these wonderful people ([emoji key](https://github.com/kentcdodds/all- This project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification. Contributions of any kind are welcome! + +This and many other exercises are built by students as part of the 4Geeks Academy [Coding Bootcamp](https://4geeksacademy.com/us/coding-bootcamp) by [Alejandro Sánchez](https://twitter.com/alesanchezr) and many other contributors. Find out more about our [Full Stack Developer Course](https://4geeksacademy.com/us/coding-bootcamps/part-time-full-stack-developer), and [Data Science Bootcamp](https://4geeksacademy.com/us/coding-bootcamps/datascience-machine-learning). From d09a84c0a1b46c786182d4d47d835a97f015e9dd Mon Sep 17 00:00:00 2001 From: ErnestoXG Date: Thu, 6 Apr 2023 20:40:09 +0000 Subject: [PATCH 009/123] added sol --- exercises/09-Function-parameters/solution.hide.py | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 exercises/09-Function-parameters/solution.hide.py diff --git a/exercises/09-Function-parameters/solution.hide.py b/exercises/09-Function-parameters/solution.hide.py new file mode 100644 index 0000000..71e6d5f --- /dev/null +++ b/exercises/09-Function-parameters/solution.hide.py @@ -0,0 +1,7 @@ +# Your code goes here: +def render_person(name, birthdate, eye_color, age, sex): + return name +" is a "+ str(age) +" years old " + sex +" born in " + birthdate + " with "+eye_color +" eyes" + + +# Do not edit below this line +print(render_person('Bob', '05/22/1983', 'green', 23, 'male')) \ No newline at end of file From 07512a040d0dd035d9acaeef1eff2024487fd810 Mon Sep 17 00:00:00 2001 From: lorenagubaira <102861577+Lorenagubaira@users.noreply.github.com> Date: Thu, 13 Apr 2023 19:46:31 +0000 Subject: [PATCH 010/123] codepaces reference --- README.es.md | 12 +++++++----- README.md | 15 +++++++++++---- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/README.es.md b/README.es.md index b273bd8..a60e9c6 100644 --- a/README.es.md +++ b/README.es.md @@ -4,6 +4,7 @@ Creado por @alesanchezr y + Aprende y practica las funciones de Python. Vas a ver los siguientes conceptos: 1. Declarar una función. @@ -26,9 +27,11 @@ Estos ejercicios son colaborativos, ¡te necesitamos! Si encuentras algún error -## Instalación en un clic: +## Instalación en un clic (recomendado) + +Puedes empezar estos ejercicios en pocos segundos haciendo clic en: [Abrir en Codespaces](https://codespaces.new/?repo=4GeeksAcademy/css-layouts-tutorial-exercises) (recomendado) o [Abrir en Gitpod](https://gitpod.io#https://github.com/4GeeksAcademy/css-layouts-tutorial-exercises.git). -Haz clic en los siguientes enlaces para abrir este tutorial inmediatamente en [Codespaces](https://codespaces.new/?repo=4GeeksAcademy/python-functions-programming-exercises) o [Gitpod](https://gitpod.io#https://github.com/4GeeksAcademy/python-functions-programming-exercises.git). +> Una vez ya tengas abierto VSCode, los ejercicios de LearnPack deberían empezar automáticamente; si esto no sucede puedes intentar empezar los ejercicios escribiendo este comando en tu terminal: `$ learnpack start` ## Instalación local: @@ -51,9 +54,6 @@ $ cd python-functions-programming-exercises $ pip install pytest==4.4.2 mock pytest-testdox $ learnpack start ``` - -Nota: Estos ejercicios tienen calificación automática pero es un tanto rígida, te recomiendo ignorar los tests, considéralos como una recomendación o podrías frustrarte. - ## ¿Cómo están organizados los ejercicios? @@ -64,6 +64,8 @@ Cada ejercicio es un pequeño proyecto en Python que contiene los siguientes arc 2. **README.md:** contiene las instrucciones del ejercicio. 3. **test.py:** no tienes que abrir este archivo. Contiene los scripts de pruebas del ejercicio. +> Nota: Estos ejercicios tienen calificación automática pero es un tanto rígida, te recomiendo ignorar los tests, considéralos como una recomendación o podrías frustrarte. + ## Colaboradores Gracias a estas personas maravillosas ([emoji key](https://github.com/kentcdodds/all-contributors#emoji-key)): diff --git a/README.md b/README.md index cb29157..5332d04 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,9 @@ By @alesanchezr and + +*Estas instrucciones [están disponibles en 🇪🇸 español](https://github.com/Lorenagubaira/python-functions-programming-exercises/blob/master/README.es.md) :es:* + Learn and practice Python Functions. You will see the folowing concepts: 1. Declaring a function. @@ -17,7 +20,7 @@ Learn and practice Python Functions. You will see the folowing concepts: 5. Function recursivity, and many other functional concepts. -Note: The entire tutorial is 👆 interactive, ✅ auto-graded and with 📹 video tutorials. +> Note: The entire tutorial is 👆 interactive, ✅ auto-graded and with 📹 video tutorials. These exercises were built in collaboration, we need you! If you find any bugs or misspells please contribute and report them. @@ -26,9 +29,12 @@ These exercises were built in collaboration, we need you! If you find any bugs o

-## One click installation: -Click in the following links to open immediately in [Codespaces](https://codespaces.new/?repo=4GeeksAcademy/python-functions-programming-exercises) or [Gitpod](https://gitpod.io#https://github.com/4GeeksAcademy/python-functions-programming-exercises.git). +## One click installation (recommended): + +You can open these exercises in just a few seconds by clicking: [Open in Codespaces](https://codespaces.new/?repo=4GeeksAcademy/css-layouts-tutorial-exercises) (recommended) or [Open in Gitpod](https://gitpod.io#https://github.com/4GeeksAcademy/css-layouts-tutorial-exercises.git). + +> Once you have VSCode open the LearnPack exercises should start automatically. If exercises don't run automatically you can try typing on your terminal: `$ learnpack start` ## Local Installation @@ -52,7 +58,6 @@ $ pip install pytest==4.4.2 mock pytest-testdox $ learnpack start ``` -Note: The exercises have automatic grading but its very rigid and string, my recomendation is to ignore the tests and use them only as a recomendation or you can get frustrated. ## How are the exercises organized? @@ -63,6 +68,8 @@ Each exercise is a small react application containing the following files: 2. **README.md:** contains exercise instructions. 3. **test.py:** you don't have to open this file, it contains the testing script for the exercise. +> Note: The exercises have automatic grading but its very rigid and string, my recomendation is to ignore the tests and use them only as a recomendation or you can get frustrated. + ## Contributors Thanks to these wonderful people ([emoji key](https://github.com/kentcdodds/all-contributors#emoji-key)): From 61a98b6d0ed14ed691b97652df02c938a5bc8a7b Mon Sep 17 00:00:00 2001 From: Alejandro Sanchez Date: Fri, 14 Apr 2023 20:52:34 -0400 Subject: [PATCH 011/123] Update .gitpod.Dockerfile --- .gitpod.Dockerfile | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/.gitpod.Dockerfile b/.gitpod.Dockerfile index 68ef1fb..e32e2b3 100644 --- a/.gitpod.Dockerfile +++ b/.gitpod.Dockerfile @@ -1,4 +1,28 @@ FROM gitpod/workspace-full:latest + +SHELL ["/bin/bash", "-c"] + +RUN sudo apt-get update \ + && sudo apt-get update \ + && sudo apt-get clean \ + && sudo rm -rf /var/cache/apt/* /var/lib/apt/lists/* /tmp/* + +# That Gitpod install pyenv for me? no, thanks +WORKDIR /home/gitpod/ +RUN rm .pyenv -Rf +RUN rm .gp_pyenv.d -Rf +RUN curl https://pyenv.run | bash + + +RUN pyenv update && pyenv install 3.10.7 && pyenv global 3.10.7 +RUN pip install pipenv + +# remove PIP_USER environment USER gitpod -RUN pip3 install pytest==4.4.2 pytest-testdox mock +RUN if ! grep -q "export PIP_USER=no" "$HOME/.bashrc"; then printf '%s\n' "export PIP_USER=no" >> "$HOME/.bashrc"; fi +RUN echo "" >> $HOME/.bashrc +RUN echo "unset DATABASE_URL" >> $HOME/.bashrc +RUN echo "export DATABASE_URL" >> $HOME/.bashrc + +RUN pip3 install pytest==6.2.5 pytest-testdox mock RUN npm i -g @learnpack/learnpack@2.1.20 && learnpack plugins:install @learnpack/python@1.0.0 From f5f0a1d67d6b88523cfc784b0e80c1f03818ba46 Mon Sep 17 00:00:00 2001 From: Alejandro Sanchez Date: Fri, 14 Apr 2023 21:12:25 -0400 Subject: [PATCH 012/123] Update .gitignore --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index f3ca55f..28bfd34 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,8 @@ /* !.gitignore +!.devcontainer +!.devcontainer/* !.gitpod.yml !.gitpod.Dockerfile !bc.json From 455bfcbfa3e8b2e0b37573f0d2c3aef7c09f0920 Mon Sep 17 00:00:00 2001 From: Alejandro Sanchez Date: Fri, 14 Apr 2023 21:12:49 -0400 Subject: [PATCH 013/123] Create devcontainer.json --- .devcontainer/devcontainer.json | 40 +++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..3c87dfd --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,40 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/python +{ + "name": "Python 3", + // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile + "image": "mcr.microsoft.com/devcontainers/python:0-3.10", + "features": { + "ghcr.io/devcontainers/features/node:1": { + "nodeGypDependencies": true, + "version": "16" + } + }, + "customizations": { + "vscode": { + "settings": { + "editor.defaultFormatter": "esbenp.prettier-vscode", + "workbench.editorAssociations": { + "*.md": "vscode.markdown.preview.editor" + } + }, + "extensions": ["learn-pack.learnpack-vscode"] + } + }, + "onCreateCommand": "pip3 install pytest==6.2.5 pytest-testdox mock && npm i @learnpack/learnpack@2.1.20 -g && learnpack plugins:install @learnpack/python@1.0.0" + + // Features to add to the dev container. More info: https://containers.dev/features. + // "features": {}, + + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [], + + // Use 'postCreateCommand' to run commands after the container is created. + // "postCreateCommand": "pip3 install --user -r requirements.txt", + + // Configure tool-specific properties. + // "customizations": {}, + + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + // "remoteUser": "root" +} From d53186f038f9d394e6f3ef816c36988fdd0e5653 Mon Sep 17 00:00:00 2001 From: lorenagubaira <102861577+Lorenagubaira@users.noreply.github.com> Date: Thu, 20 Apr 2023 21:32:45 +0000 Subject: [PATCH 014/123] the links were updated --- README.es.md | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.es.md b/README.es.md index a60e9c6..ca39bca 100644 --- a/README.es.md +++ b/README.es.md @@ -29,7 +29,7 @@ Estos ejercicios son colaborativos, ¡te necesitamos! Si encuentras algún error ## Instalación en un clic (recomendado) -Puedes empezar estos ejercicios en pocos segundos haciendo clic en: [Abrir en Codespaces](https://codespaces.new/?repo=4GeeksAcademy/css-layouts-tutorial-exercises) (recomendado) o [Abrir en Gitpod](https://gitpod.io#https://github.com/4GeeksAcademy/css-layouts-tutorial-exercises.git). +Puedes empezar estos ejercicios en pocos segundos haciendo clic en: [Abrir en Codespaces](https://codespaces.new/?repo=4GeeksAcademy/python-functions-programming-exercises) (recomendado) o [Abrir en Gitpod](https://gitpod.io#https://github.com/4GeeksAcademy/python-functions-programming-exercises.git). > Una vez ya tengas abierto VSCode, los ejercicios de LearnPack deberían empezar automáticamente; si esto no sucede puedes intentar empezar los ejercicios escribiendo este comando en tu terminal: `$ learnpack start` diff --git a/README.md b/README.md index 5332d04..704c8b8 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ These exercises were built in collaboration, we need you! If you find any bugs o ## One click installation (recommended): -You can open these exercises in just a few seconds by clicking: [Open in Codespaces](https://codespaces.new/?repo=4GeeksAcademy/css-layouts-tutorial-exercises) (recommended) or [Open in Gitpod](https://gitpod.io#https://github.com/4GeeksAcademy/css-layouts-tutorial-exercises.git). +You can open these exercises in just a few seconds by clicking: [Open in Codespaces](https://codespaces.new/?repo=4GeeksAcademy/python-functions-programming-exercises) (recommended) or [Open in Gitpod](https://gitpod.io#https://github.com/4GeeksAcademy/python-functions-programming-exercises). > Once you have VSCode open the LearnPack exercises should start automatically. If exercises don't run automatically you can try typing on your terminal: `$ learnpack start` From ade25903a0ca2eb87c664feb72d100ac14cedf5f Mon Sep 17 00:00:00 2001 From: lorenagubaira <102861577+Lorenagubaira@users.noreply.github.com> Date: Mon, 24 Apr 2023 11:04:23 +0000 Subject: [PATCH 015/123] the settings.json file was updated --- .gitignore | 1 + .vscode/settings.json | 8 ++++++++ 2 files changed, 9 insertions(+) create mode 100644 .vscode/settings.json diff --git a/.gitignore b/.gitignore index 28bfd34..964585a 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,7 @@ !learn.json !README.md !README.*.md +!.vscode !/exercises !/exercises/* diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..2f5ad94 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,8 @@ +{ + "files.autoSave": "afterDelay", + "files.autoSaveDelay": 700, + "editor.minimap.enabled": false, + "workbench.editorAssociations": { + "*.md": "vscode.markdown.preview.editor" + } +} \ No newline at end of file From c1680dee8aea088518add282ff4aaadb12ce978f Mon Sep 17 00:00:00 2001 From: Ernesto Gonzalez <60261375+UmiKami@users.noreply.github.com> Date: Wed, 30 Aug 2023 15:34:59 +0000 Subject: [PATCH 016/123] increased flexibility of test by adding blank space tolerance --- exercises/04-Call-a-function/tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/04-Call-a-function/tests.py b/exercises/04-Call-a-function/tests.py index cbd4870..52dc7d3 100755 --- a/exercises/04-Call-a-function/tests.py +++ b/exercises/04-Call-a-function/tests.py @@ -48,5 +48,5 @@ def test_call_calculate_area(): path = os.path.dirname(os.path.abspath(__file__))+'/app.py' with open(path, 'r') as content_file: content = content_file.read() - regex = re.compile(r"=(\s*)calculate_area\(") + regex = re.compile(r"=(\s*)calculate_area\s*\(") assert bool(regex.search(content)) == True \ No newline at end of file From 2621f89b71a13d0d07ba861661a3809c1b01c91c Mon Sep 17 00:00:00 2001 From: Ernesto Gonzalez <60261375+UmiKami@users.noreply.github.com> Date: Wed, 30 Aug 2023 15:35:55 +0000 Subject: [PATCH 017/123] added solution file --- exercises/04-Call-a-function/solution.hide.py | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 exercises/04-Call-a-function/solution.hide.py diff --git a/exercises/04-Call-a-function/solution.hide.py b/exercises/04-Call-a-function/solution.hide.py new file mode 100644 index 0000000..d02eb4a --- /dev/null +++ b/exercises/04-Call-a-function/solution.hide.py @@ -0,0 +1,7 @@ +def calculate_area(length,edge): + return length * edge + +# Your code Below this line: +square_area1 = calculate_area(4,4) +square_area2 = calculate_area(2,2) +square_area3 = calculate_area(5,5) \ No newline at end of file From fe80228644ddb235c760844661d4532ae66489f0 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 22 Nov 2023 19:00:09 +0100 Subject: [PATCH 018/123] Update README.md --- README.md | 34 +++++++++++++++------------------- 1 file changed, 15 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 704c8b8..a0ced50 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ By @alesanchezr and - -

+These exercises were built in collaboration, we need you! If you find any bugs or misspellings, please contribute and report them. @@ -34,49 +30,49 @@ These exercises were built in collaboration, we need you! If you find any bugs o You can open these exercises in just a few seconds by clicking: [Open in Codespaces](https://codespaces.new/?repo=4GeeksAcademy/python-functions-programming-exercises) (recommended) or [Open in Gitpod](https://gitpod.io#https://github.com/4GeeksAcademy/python-functions-programming-exercises). -> Once you have VSCode open the LearnPack exercises should start automatically. If exercises don't run automatically you can try typing on your terminal: `$ learnpack start` +> Once you have VSCode open, the LearnPack exercises should start automatically. If exercises don't run automatically you can try typing on your terminal: `$ learnpack start` ## Local Installation -1) Make sure you have [learnpack](https://learnpack.co) installed, `node.js` version 14+ and python version 3+. This is the command to install learnpack: +1) Make sure you have [LearnPack](https://learnpack.co) installed, node.js version 14+, and Python version 3+. This is the command to install LearnPack: -``` +```bash $ npm i learnpack -g && learnpack plugins:install learnpack-python ``` -2) Clone or download this repository. Once you finish downloading, you will find a new folder with a subdirectory "exercises" that contains all the exercises within. +2) Clone or download this repository. Once you finish downloading, you will find a new folder with a subdirectory called "exercises" that contains all the exercises within. -``` +```bash $ git clone https://github.com/4GeeksAcademy/python-functions-programming-exercises.git ``` 3) Start the tutorial/exercises by running the following command from the root of the project: -```sh +```bash $ cd python-functions-programming-exercises $ pip install pytest==4.4.2 mock pytest-testdox $ learnpack start ``` - + ## How are the exercises organized? -Each exercise is a small react application containing the following files: +Each exercise is a small React application containing the following files: -1. **app.py:** represents the entry python file that will be executed by the computer. +1. **app.py:** represents the entry Python file that will be executed by the computer. 2. **README.md:** contains exercise instructions. 3. **test.py:** you don't have to open this file, it contains the testing script for the exercise. -> Note: The exercises have automatic grading but its very rigid and string, my recomendation is to ignore the tests and use them only as a recomendation or you can get frustrated. +> Note: The exercises have automatic grading, but it's very rigid and strict, my recommendation is to not take the tests too serious and use them only as a suggestion, or you may get frustrated. ## Contributors Thanks to these wonderful people ([emoji key](https://github.com/kentcdodds/all-contributors#emoji-key)): -1. [Alejandro Sanchez (alesanchezr)](https://github.com/alesanchezr), contribution: (coder) 💻 (idea) 🤔, (build-tests) ⚠️ , (pull-request-review) 👀 (build-tutorial) ✅ (documentation) 📖 +1. [Alejandro Sanchez (alesanchezr)](https://github.com/alesanchezr), contribution: (coder) 💻, (idea) 🤔, (build-tests) ⚠️, (pull-request-review) 👀, (build-tutorial) ✅ (documentation) 📖 -2. [Paolo (plucodev)](https://github.com/plucodev), contribution: (bug reports) 🐛, contribution: (coder), (translation) 🌎 +2. [Paolo (plucodev)](https://github.com/plucodev), contribution: (bug reports) 🐛, (coder) 💻, (translation) 🌎 3. [Marco Gómez (marcogonzalo)](https://github.com/marcogonzalo), contribution: (bug reports) :🐛, (translation) 🌎 From b27c19a1b03bcf7cfc6da90fa1c92af6f1f12a2a Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 22 Nov 2023 19:10:58 +0100 Subject: [PATCH 019/123] Update README.es.md --- README.es.md | 37 +++++++++++++++++-------------------- 1 file changed, 17 insertions(+), 20 deletions(-) diff --git a/README.es.md b/README.es.md index ca39bca..1a99e9c 100644 --- a/README.es.md +++ b/README.es.md @@ -1,6 +1,6 @@ -# 🐍 Turorial y Ejercicios sobre Funciones de Python -Creado por @alesanchezr y othors contribuyentes en 4Geeks Academy +# 🐍 Tutorial y Ejercicios sobre Funciones de Python +Creado por @alesanchezr y otros contribuyentes en 4Geeks Academy @@ -13,66 +13,63 @@ Aprende y practica las funciones de Python. Vas a ver los siguientes conceptos: 3. Alcances de funciones. -4. Funciones añadidas. +4. Funciones anidadas. 5. Recursividad de funciones y muchos otros conceptos funcionales. -Todo el tutorial es 👆 interactivo, ✅ calificado automáticamente y con. 📹 videos tutoriales. +Todo el tutorial es 👆 interactivo, ✅ calificado automáticamente y con 📹 video tutoriales. Estos ejercicios son colaborativos, ¡te necesitamos! Si encuentras algún error o falta de ortografía, por favor contribuye y repórtalo. -

- -

- ## Instalación en un clic (recomendado) Puedes empezar estos ejercicios en pocos segundos haciendo clic en: [Abrir en Codespaces](https://codespaces.new/?repo=4GeeksAcademy/python-functions-programming-exercises) (recomendado) o [Abrir en Gitpod](https://gitpod.io#https://github.com/4GeeksAcademy/python-functions-programming-exercises.git). -> Una vez ya tengas abierto VSCode, los ejercicios de LearnPack deberían empezar automáticamente; si esto no sucede puedes intentar empezar los ejercicios escribiendo este comando en tu terminal: `$ learnpack start` +> Una vez ya tengas abierto VSCode, los ejercicios de LearnPack deberían empezar automáticamente; si esto no sucede, puedes intentar empezar los ejercicios escribiendo este comando en tu terminal: `$ learnpack start` ## Instalación local: -1) Asegúrate de instalar [learnpack](https://learnpack.co), `node.js` version 14+ y python version 3+. Este es el comando para instalar learnpack: +1) Asegúrate de instalar [LearnPack](https://learnpack.co), node.js version 14+ y Python version 3+. Este es el comando para instalar LearnPack: -```sh +```bash $ npm i learnpack -g && learnpack plugins:install learnpack-python ``` -2) Clona o descarga este repositorio. Una vez que termines de descargar, encontrarás un carpeta nueva con un subdirectorio "exercises" que contiene los ejercicios. +2) Clona o descarga este repositorio. Una vez que termines de descargar, encontrarás una carpeta nueva con un subdirectorio llamado "exercises" que contiene los ejercicios. -```sh +```bash $ git clone https://github.com/4GeeksAcademy/python-functions-programming-exercises.git ``` 3) Comienza el tutorial/ejercicios ejecutando el siguiente comando en la raíz del proyecto: -```sh +```bash $ cd python-functions-programming-exercises $ pip install pytest==4.4.2 mock pytest-testdox $ learnpack start ``` + ## ¿Cómo están organizados los ejercicios? Cada ejercicio es un pequeño proyecto en Python que contiene los siguientes archivos: -1. **app.py:** representa el archivo de entrada de python que será ejecutado en el computador. +1. **app.py:** representa el archivo de entrada de Python que será ejecutado en el computador. 2. **README.md:** contiene las instrucciones del ejercicio. -3. **test.py:** no tienes que abrir este archivo. Contiene los scripts de pruebas del ejercicio. +3. **test.py:** no tienes que abrir este archivo, contiene los scripts de pruebas del ejercicio. -> Nota: Estos ejercicios tienen calificación automática pero es un tanto rígida, te recomiendo ignorar los tests, considéralos como una recomendación o podrías frustrarte. +> Nota: Estos ejercicios tienen calificación automática. Los tests son muy rígidos y estrictos, mi recomendación es que no prestes demasiada atención a los tests y los uses solo como una sugerencia o podrías frustrarte. ## Colaboradores Gracias a estas personas maravillosas ([emoji key](https://github.com/kentcdodds/all-contributors#emoji-key)): -1. [Alejandro Sanchez (alesanchezr)](https://github.com/alesanchezr), contribución: (programador) 💻 (idea) 🤔, (build-tests) ⚠️ , (pull-request-review) 🤓 (build-tutorial) ✅ (documentación) 📖 +1. [Alejandro Sanchez (alesanchezr)](https://github.com/alesanchezr), contribución: (programador) 💻, (idea) 🤔, (build-tests) ⚠️, (pull-request-review) 🤓, (build-tutorial) ✅, (documentación) 📖 -2. [Paolo (plucodev)](https://github.com/plucodev), contribución: (bug reports) 🐛, (programador), (traducción) 🌎 +2. [Paolo (plucodev)](https://github.com/plucodev), contribución: (bug reports) 🐛, (programador) 💻, (traducción) 🌎 3. [Marco Gómez (marcogonzalo)](https://github.com/marcogonzalo), contribution: (bug reports) 🐛, (traducción) 🌎 @@ -82,4 +79,4 @@ Este proyecto sigue la especificación [all-contributors](https://github.com/ken Este proyecto sigue la especificación [all-contributors](https://github.com/kentcdodds/all-contributors). ¡Todas las contribuciones son bienvenidas! -Este y otros ejercicios son usados para [aprender a programar](https://4geeksacademy.com/es/aprender-a-programar/aprender-a-programar-desde-cero) por parte de los alumnos de 4Geeks Academy [Coding Bootcamp](https://4geeksacademy.com/us/coding-bootcamp) realizado por [Alejandro Sánchez](https://twitter.com/alesanchezr) y muchos otros contribuyentes. Conoce más sobre nuestros [Curso de Programación](https://4geeksacademy.com/es/curso-de-programacion-desde-cero?lang=es) para convertirte en [Full Stack Developer](https://4geeksacademy.com/es/coding-bootcamps/desarrollador-full-stack/?lang=es), o nuestro [Data Science Bootcamp](https://4geeksacademy.com/es/coding-bootcamps/curso-datascience-machine-learning). \ No newline at end of file +Este y otros ejercicios son usados para [aprender a programar](https://4geeksacademy.com/es/aprender-a-programar/aprender-a-programar-desde-cero) por parte de los alumnos de 4Geeks Academy [Coding Bootcamp](https://4geeksacademy.com/us/coding-bootcamp) realizado por [Alejandro Sánchez](https://twitter.com/alesanchezr) y muchos otros contribuyentes. Conoce más sobre nuestros [Cursos de Programación](https://4geeksacademy.com/es/curso-de-programacion-desde-cero?lang=es) para convertirte en [Full Stack Developer](https://4geeksacademy.com/es/coding-bootcamps/desarrollador-full-stack/?lang=es), o nuestro [Data Science Bootcamp](https://4geeksacademy.com/es/coding-bootcamps/curso-datascience-machine-learning). From 25aa0c717d14ff32e1b4e54b411d45245feb5595 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 22 Nov 2023 19:11:40 +0100 Subject: [PATCH 020/123] Update README.es.md --- README.es.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.es.md b/README.es.md index 1a99e9c..27f2c3e 100644 --- a/README.es.md +++ b/README.es.md @@ -11,7 +11,7 @@ Aprende y practica las funciones de Python. Vas a ver los siguientes conceptos: 2. Llamar a una función. -3. Alcances de funciones. +3. Alcance de una función. 4. Funciones anidadas. From fed4e6f67164dad6e86c4edc3430839831d72686 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 22 Nov 2023 19:13:18 +0100 Subject: [PATCH 021/123] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a0ced50..1b224b1 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ By @alesanchezr and -*Estas instrucciones [están disponibles en 🇪🇸 español](https://github.com/Lorenagubaira/python-functions-programming-exercises/blob/master/README.es.md) :es:* +*Estas instrucciones [están disponibles en 🇪🇸 español](https://github.com/4GeeksAcademy/python-functions-programming-exercises/blob/master/README.es.md) :es:* Learn and practice Python Functions. You will see the following concepts: From 3938ca85be27f5fabf408b8304def472cfc64d38 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 22 Nov 2023 19:14:19 +0100 Subject: [PATCH 022/123] Update learn.json --- learn.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/learn.json b/learn.json index 73fe16d..6e17813 100644 --- a/learn.json +++ b/learn.json @@ -7,7 +7,7 @@ "repository": "https://github.com/4GeeksAcademy/python-functions-programming-exercises", "preview": "https://github.com/4GeeksAcademy/python-functions-programming-exercises/blob/master/preview.gif?raw=true", "description": { - "us": "Learn and master functional programing by doing auto-graded interactive exercises.", + "us": "Learn and master functional programming by doing auto-graded interactive exercises.", "es": "Aprende y domina funciones en Python haciendo ejercicios interactivos y auto-evaluados." }, "duration": 10, From 95937fedfbd0c7ee7f556cbcf8417e2a10b7b73c Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 22 Nov 2023 19:38:36 +0100 Subject: [PATCH 023/123] Update README.md --- exercises/01-hello-world/README.md | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/exercises/01-hello-world/README.md b/exercises/01-hello-world/README.md index c9a83c8..30cf49b 100644 --- a/exercises/01-hello-world/README.md +++ b/exercises/01-hello-world/README.md @@ -2,32 +2,30 @@ intro: "https://www.youtube.com/watch?v=awa_yfGgy9s" --- -# Learn Python Functions! +# Welcome to Python Functions! We are very excited to have you here !! 🎉 😂 -Click `next` on the top right of this instructions when you are ready to start. +Click `next` on the top right of these instructions when you are ready to start. -During this course you will be learning the following concepts: +During this course, you will be learning the following concepts: -1. Learning how to create and call **functions.*** +1. Learning how to create and call functions. -2. Building your first real **functions** +2. Building your first real functions. -3. Get comfortable using Python **Lambda Functions** +3. Get comfortable using Python Lambda Functions. -4. Construct **functions** with parameters. +4. Construct functions with parameters. -5. Real life examples for **functions** +5. Real life examples for functions. ## Contributors Thanks goes to these wonderful people ([emoji key](https://github.com/kentcdodds/all-contributors#emoji-key)): -1. [Alejandro Sanchez (alesanchezr)](https://github.com/alesanchezr), contribution: (coder) :computer: (idea) 🤔, (build-tests) :warning:, (pull-request-review) :eyes: (build-tutorial) :white_check_mark: (documentation) :book: -2. [Paolo (plucodev)](https://github.com/plucodev), contribution: (bug reports) :bug:, contribution: (coder), (translation) :earth_americas: -3. [Marco Gómez (marcogonzalo)](https://github.com/marcogonzalo), contribution: (bug reports) :bug:, (translation) :earth_africa: +1. [Alejandro Sanchez (alesanchezr)](https://github.com/alesanchezr), contribution: (coder) 💻 (idea) 🤔, (build-tests) ⚠️, (pull-request-review) 🤓, (build-tutorial) ✅, (documentation) 📖 +2. [Paolo (plucodev)](https://github.com/plucodev), contribution: (bug reports) 🐛, (coder) 💻, (translation) 🌎 +3. [Marco Gómez (marcogonzalo)](https://github.com/marcogonzalo), contribution: (bug reports) 🐛, (translation) 🌎 -This project follows the -[all-contributors](https://github.com/kentcdodds/all-contributors) -specification. Contributions of any kind are welcome! +This project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification. Contributions of any kind are welcome! From d4cd0b8db591e04198b011af93e38651c9f35be2 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 22 Nov 2023 20:02:26 +0100 Subject: [PATCH 024/123] Update README.md --- exercises/01-hello-world/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/exercises/01-hello-world/README.md b/exercises/01-hello-world/README.md index 30cf49b..5522b4b 100644 --- a/exercises/01-hello-world/README.md +++ b/exercises/01-hello-world/README.md @@ -6,7 +6,7 @@ intro: "https://www.youtube.com/watch?v=awa_yfGgy9s" We are very excited to have you here !! 🎉 😂 -Click `next` on the top right of these instructions when you are ready to start. +Click `Next →` on the top right of these instructions when you are ready to start. During this course, you will be learning the following concepts: @@ -24,7 +24,7 @@ During this course, you will be learning the following concepts: Thanks goes to these wonderful people ([emoji key](https://github.com/kentcdodds/all-contributors#emoji-key)): -1. [Alejandro Sanchez (alesanchezr)](https://github.com/alesanchezr), contribution: (coder) 💻 (idea) 🤔, (build-tests) ⚠️, (pull-request-review) 🤓, (build-tutorial) ✅, (documentation) 📖 +1. [Alejandro Sanchez (alesanchezr)](https://github.com/alesanchezr), contribution: (coder) 💻, (idea) 🤔, (build-tests) ⚠️, (pull-request-review) 🤓, (build-tutorial) ✅, (documentation) 📖 2. [Paolo (plucodev)](https://github.com/plucodev), contribution: (bug reports) 🐛, (coder) 💻, (translation) 🌎 3. [Marco Gómez (marcogonzalo)](https://github.com/marcogonzalo), contribution: (bug reports) 🐛, (translation) 🌎 From 86ba89b902166db27cae9e85a57ca0d9eebcb12b Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 22 Nov 2023 20:02:30 +0100 Subject: [PATCH 025/123] Update README.es.md --- exercises/01-hello-world/README.es.md | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/exercises/01-hello-world/README.es.md b/exercises/01-hello-world/README.es.md index 7f288fa..82f48a5 100644 --- a/exercises/01-hello-world/README.es.md +++ b/exercises/01-hello-world/README.es.md @@ -1,29 +1,27 @@ -# Aprende Funciones en Python! +# Welcome to Python Functions! -¡¡Nos estusiasma mucho tenerte aquí!! 🎉 😂 +¡¡Nos entusiasma mucho tenerte aquí!! 🎉 😂 Presiona `Next →` en la esquina superior derecha cuando quieras empezar. En este curso aprenderás los siguientes conceptos: -1. Cómo crear y llamar **funciones.** +1. Cómo crear y llamar funciones. -2. Construir tus primeras **funciones.** +2. Construir tus primeras funciones. -3. Sentirte cómod@ usando **funciones Lambda** en Python. +3. Practicar las funciones Lambda de Python. -4. Construir **funciones** con parámetros. +4. Construir funciones con parámetros. -5. Ejemplos de la vida real con **funciones** +5. Ejemplos de la vida real con funciones. ## Contributors Thanks goes to these wonderful people ([emoji key](https://github.com/kentcdodds/all-contributors#emoji-key)): -1. [Alejandro Sanchez (alesanchezr)](https://github.com/alesanchezr), contribution: (coder) :computer: (idea) 🤔, (build-tests) :warning:, (pull-request-review) :eyes: (build-tutorial) :white_check_mark: (documentation) :book: -2. [Paolo (plucodev)](https://github.com/plucodev), contribución: (bug reports) :bug: (coder) :computer:, (traducción) :earth_americas: -3. [Marco Gómez (marcogonzalo)](https://github.com/marcogonzalo), contribución: (bug reports) :bug:, (traducción) :earth_africa: +1. [Alejandro Sanchez (alesanchezr)](https://github.com/alesanchezr), contribution: (coder) 💻, (idea) 🤔, (build-tests) ⚠️, (pull-request-review) 🤓, (build-tutorial) ✅, (documentation) 📖 +2. [Paolo (plucodev)](https://github.com/plucodev), contribución: (bug reports) 🐛, (coder) 💻, (traducción) 🌎 +3. [Marco Gómez (marcogonzalo)](https://github.com/marcogonzalo), contribución: (bug reports) 🐛, (traducción) 🌎 -This project follows the -[all-contributors](https://github.com/kentcdodds/all-contributors) -specification. Contributions of any kind are welcome! +This project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification. Contributions of any kind are welcome! From 185c68ca1badabaf2352bbb7033c7df44f57dff4 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 22 Nov 2023 20:12:56 +0100 Subject: [PATCH 026/123] Update README.md --- exercises/02-Hello-World/README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/exercises/02-Hello-World/README.md b/exercises/02-Hello-World/README.md index 99bb08f..826f3ac 100644 --- a/exercises/02-Hello-World/README.md +++ b/exercises/02-Hello-World/README.md @@ -4,22 +4,22 @@ tutorial: "https://www.youtube.com/watch?v=voBO7a0KPtE" # `02` Hello World -In Python, we use `print` to make the computer write anything we want (the content of a variable, a given string, etc.) in something called `the console`. +In Python, we use `print` to make the computer write anything we want (the content of a variable, a given string, etc.) in something called "the console". -Every language has **functions** to integrate with the console, as it was the only way to interact with the users at the beginning (before the Windows or Linux or MacOS arrived). +Every language has **functions** to integrate with the console, as it was the only way to interact with the users at the beginning (before Windows, Linux or macOS arrived). -Today, printing in the console is used mostly as a monitoring tool, ideal to leave a trace of the content of variables during the program execution. +Today, printing in the console is mostly used as a monitoring and debugging tool, ideal for leaving a trace of the content of variables during the program's execution. This is an example of how to use it: + ```py print("How are you?") ``` ## 📝 Instructions: -1. Use `print` to display `"Hello World"` on the console. Feel free to try other things as well. +1. Use `print()` to display `"Hello World"` on the console. Feel free to try other things as well. ## 💡 Hint: -+ :video_camera: You can watch this 5 minutes video about the console: -https://www.youtube.com/watch?v=vROGBvX_MHQ ++ 📹 You can watch this 2 minute video about the console: https://www.youtube.com/watch?v=vROGBvX_MHQ From 849627ea920fcf13f7916e67be6e23fe8db7e93d Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 22 Nov 2023 20:14:19 +0100 Subject: [PATCH 027/123] Update README.md --- exercises/02-Hello-World/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/02-Hello-World/README.md b/exercises/02-Hello-World/README.md index 826f3ac..25b59bc 100644 --- a/exercises/02-Hello-World/README.md +++ b/exercises/02-Hello-World/README.md @@ -4,7 +4,7 @@ tutorial: "https://www.youtube.com/watch?v=voBO7a0KPtE" # `02` Hello World -In Python, we use `print` to make the computer write anything we want (the content of a variable, a given string, etc.) in something called "the console". +In Python, we use **print** to make the computer write anything we want (the content of a variable, a given string, etc.) in something called "the console". Every language has **functions** to integrate with the console, as it was the only way to interact with the users at the beginning (before Windows, Linux or macOS arrived). From c8d874ba716f90c16b4348818bf5cb3404f4775a Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 22 Nov 2023 20:17:58 +0100 Subject: [PATCH 028/123] Update README.es.md --- exercises/02-Hello-World/README.es.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/exercises/02-Hello-World/README.es.md b/exercises/02-Hello-World/README.es.md index 0e91c64..c27cad8 100644 --- a/exercises/02-Hello-World/README.es.md +++ b/exercises/02-Hello-World/README.es.md @@ -1,10 +1,12 @@ # `02` Hello World -En Python, usamos `print` para hacer que el computador escriba cualquier cosa que queramos (el contenido de una variable, un texto dado, etc.) en algo llamado `la consola`. +En Python, usamos **print** para hacer que el computador escriba cualquier cosa que queramos (el contenido de una variable, un string dado, etc.) en algo llamado "la consola". -Cada idioma tiene **funciones** para integrarse con la consola, ya que al principio era la única forma de interactuar con los usuarios (antes de que llegara Windows o MacOS o Linux). Hoy en día, la impresión en la consola se utiliza (`print`) sobre todo como herramienta de monitoreo, ideal para dejar un rastro del contenido de las variables durante la ejecución del programa. +Cada lenguaje tiene **funciones** para integrarse con la consola, ya que al principio era la única forma de interactuar con los usuarios (antes de que llegaran Windows, Linux o macOS) -Este es un ejemplo de cómo usarlo +Hoy en día, la impresión en la consola se utiliza, sobre todo, como herramienta de monitoreo y depuración, ideal para dejar un rastro del contenido de las variables durante la ejecución del programa. + +Este es un ejemplo de cómo usarla: ```py print("How are you?") @@ -16,5 +18,4 @@ print("How are you?") ## 💡 Pista: -+ :video_camera: Puedes ver este breve video (5 minutos) sobre la consola: -https://www.youtube.com/watch?v=vROGBvX_MHQ ++ 📹 Puedes ver este breve video (2 minutos) sobre la consola: https://www.youtube.com/watch?v=vROGBvX_MHQ From fc6cc2cfc9cf9d9dcd78fd4310bbadd977e181eb Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 22 Nov 2023 20:18:22 +0100 Subject: [PATCH 029/123] Update README.es.md --- exercises/02-Hello-World/README.es.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/02-Hello-World/README.es.md b/exercises/02-Hello-World/README.es.md index c27cad8..2ebad83 100644 --- a/exercises/02-Hello-World/README.es.md +++ b/exercises/02-Hello-World/README.es.md @@ -2,7 +2,7 @@ En Python, usamos **print** para hacer que el computador escriba cualquier cosa que queramos (el contenido de una variable, un string dado, etc.) en algo llamado "la consola". -Cada lenguaje tiene **funciones** para integrarse con la consola, ya que al principio era la única forma de interactuar con los usuarios (antes de que llegaran Windows, Linux o macOS) +Cada lenguaje tiene **funciones** para integrarse con la consola, ya que al principio era la única forma de interactuar con los usuarios (antes de que llegaran Windows, Linux o macOS). Hoy en día, la impresión en la consola se utiliza, sobre todo, como herramienta de monitoreo y depuración, ideal para dejar un rastro del contenido de las variables durante la ejecución del programa. From bc3b37086a48cda33fc66c5a46600dd7a0489108 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 22 Nov 2023 20:18:37 +0100 Subject: [PATCH 030/123] Update app.py --- exercises/02-Hello-World/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/02-Hello-World/app.py b/exercises/02-Hello-World/app.py index 801de24..fce62c1 100644 --- a/exercises/02-Hello-World/app.py +++ b/exercises/02-Hello-World/app.py @@ -1 +1 @@ -# your code here \ No newline at end of file +# Your code here From ea6a0e2b6548519be2d7e655c7ebb8ee83a73d78 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 22 Nov 2023 20:19:47 +0100 Subject: [PATCH 031/123] Create solution.hide.py --- exercises/02-Hello-World/solution.hide.py | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 exercises/02-Hello-World/solution.hide.py diff --git a/exercises/02-Hello-World/solution.hide.py b/exercises/02-Hello-World/solution.hide.py new file mode 100644 index 0000000..84d3ce7 --- /dev/null +++ b/exercises/02-Hello-World/solution.hide.py @@ -0,0 +1,3 @@ +# Your code here + +print("Hello World!") From d893571d2a66b03c879a62931cf7b2e35894c4ea Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 22 Nov 2023 20:19:58 +0100 Subject: [PATCH 032/123] Update solution.hide.py --- exercises/02-Hello-World/solution.hide.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/02-Hello-World/solution.hide.py b/exercises/02-Hello-World/solution.hide.py index 84d3ce7..a033754 100644 --- a/exercises/02-Hello-World/solution.hide.py +++ b/exercises/02-Hello-World/solution.hide.py @@ -1,3 +1,3 @@ # Your code here -print("Hello World!") +print("Hello World") From 16d9038149e6071d897352b116c01f6efc5260da Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 22 Nov 2023 20:27:14 +0100 Subject: [PATCH 033/123] Update README.md --- exercises/03-What-is-a-function/README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/exercises/03-What-is-a-function/README.md b/exercises/03-What-is-a-function/README.md index 7f2a283..6d3dab9 100755 --- a/exercises/03-What-is-a-function/README.md +++ b/exercises/03-What-is-a-function/README.md @@ -10,19 +10,19 @@ For example: If we want to get the sum of two numbers, we can declare a function ```python def sum(number1,number2): - return number1 + number2 + return number1 + number2 ``` -After the function is declared we can use it as many times as we want, like this: +After the function is declared, we can use it as many times as we want, like this: ```python total = sum(2,3) total2 = sum(5,10) -print(total) # prints 5 on the console -print(total2) # prints 15 on the console +print(total) # Prints 5 on the console +print(total2) # Prints 15 on the console ``` -# 📝 Instructions +## 📝 Instructions: -1. Please calculate the sum between **3445324** and **53454423** and assign the result to a variable called `super_duper` +1. Please calculate the sum between `3445324` and `53454423` and assign the result to a variable called `super_duper` From 1a1fec3cbc33079eac311fc7120bb6b8777fd3a7 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 22 Nov 2023 20:29:04 +0100 Subject: [PATCH 034/123] Update README.md --- exercises/03-What-is-a-function/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/03-What-is-a-function/README.md b/exercises/03-What-is-a-function/README.md index 6d3dab9..4f00844 100755 --- a/exercises/03-What-is-a-function/README.md +++ b/exercises/03-What-is-a-function/README.md @@ -25,4 +25,4 @@ print(total2) # Prints 15 on the console ## 📝 Instructions: -1. Please calculate the sum between `3445324` and `53454423` and assign the result to a variable called `super_duper` +1. Please calculate the sum between `3445324` and `53454423` and assign the result to a variable called `super_duper`. From 3d4a1141f42e37d28f53af10aaa6072879984dfc Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 22 Nov 2023 20:29:23 +0100 Subject: [PATCH 035/123] Update README.es.md --- exercises/03-What-is-a-function/README.es.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/exercises/03-What-is-a-function/README.es.md b/exercises/03-What-is-a-function/README.es.md index 93e8ee9..e1de4ff 100644 --- a/exercises/03-What-is-a-function/README.es.md +++ b/exercises/03-What-is-a-function/README.es.md @@ -1,12 +1,12 @@ -# `03` ¿Qué es una función (function)? +# `03` What is a function? -Puedes ver una función como un **fragmento de código** que puedes encapsular entre llaves para poder usarla varias veces. +Puedes ver una función como un **fragmento de código** que puedes usar varias veces. Por ejemplo, si queremos obtener la suma de dos números, podemos declarar una función llamada `sum` que devuelve la suma de `number1` y `number2`: ```python def sum(number1,number2): - return number1 + number2 + return number1 + number2 ``` Después de declarar la función, podemos usarla tantas veces como queramos, así: @@ -15,10 +15,10 @@ Después de declarar la función, podemos usarla tantas veces como queramos, as total = sum(2,3) total2 = sum(5,10) -print(total) # imprime 5 en la consola -print(total2) # imprime 15 en la consola +print(total) # Imprime 5 en la consola +print(total2) # Imprime 15 en la consola ``` -# 📝 Instrucciones +## 📝 Instrucciones: -1. Calcula la suma entre **3445324** y **53454423** y asigna el resultado a una variable llamada `super_duper` +1. Calcula la suma entre `3445324` y `53454423` y asigna el resultado a una variable llamada `super_duper`. From 1684f5886515adc5c82a26ead61cd47a374e7cfe Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 22 Nov 2023 20:34:16 +0100 Subject: [PATCH 036/123] Create solution.hide.py --- exercises/03-What-is-a-function/solution.hide.py | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 exercises/03-What-is-a-function/solution.hide.py diff --git a/exercises/03-What-is-a-function/solution.hide.py b/exercises/03-What-is-a-function/solution.hide.py new file mode 100644 index 0000000..a313431 --- /dev/null +++ b/exercises/03-What-is-a-function/solution.hide.py @@ -0,0 +1,6 @@ +def sum(number1,number2): + return number1 + number2 + +# Your code here +super_duper = sum(3445324,53454423) +print(super_duper) From 6040cfdb03544595cd2cf002e3d0e163a573319e Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 22 Nov 2023 20:34:22 +0100 Subject: [PATCH 037/123] Update app.py --- exercises/03-What-is-a-function/app.py | 1 + 1 file changed, 1 insertion(+) diff --git a/exercises/03-What-is-a-function/app.py b/exercises/03-What-is-a-function/app.py index daa9ff3..efeec63 100755 --- a/exercises/03-What-is-a-function/app.py +++ b/exercises/03-What-is-a-function/app.py @@ -1,5 +1,6 @@ def sum(number1,number2): return number1 + number2 +# Your code here total = sum(2,3) print(total) From c0891c6b5a8e7371663f7143a485990197fcee02 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 22 Nov 2023 20:46:52 +0100 Subject: [PATCH 038/123] Update README.md --- exercises/04-Call-a-function/README.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/exercises/04-Call-a-function/README.md b/exercises/04-Call-a-function/README.md index f26383c..f8ecbed 100755 --- a/exercises/04-Call-a-function/README.md +++ b/exercises/04-Call-a-function/README.md @@ -2,47 +2,47 @@ tutorial: "https://www.youtube.com/watch?v=NU5iW_bWwmY" --- -# `04` Calling a function +# `04` Calling a Function A function could receive zero parameters, and it always returns something, even if you don't explicitly add the `return` statement. -:point_up: [Click here to read more about functions](https://content.breatheco.de/lesson/working-with-functions-python) +👉 [Click here to read more about functions](https://content.breatheco.de/lesson/working-with-functions-python) For example: a function that calculates the area of a square will be something like this: ```python -def calculate_area(length, edge): - return length * edge +def calculate_area(length, width): + return length * width ``` If you want to use that function to calculate the area of a square with: ```python length = 3 -edge = 6 +width = 6 ``` You need to do something like this: ```python area = calculate_area(3,6) -# The value of area will be set to 18 +# The value of 'area' will be set to 18 ``` ## 📝 Instructions: -1. Create a new variables named `square_area1`, `square_area2`, `square_area3` and call the function `calculate_area` three times one for each square in the picture, for example: +1. Create new variables named `square_area1`, `square_area2`, `square_area3` and call the function `calculate_area` three times, one for each square in the picture, for example: ```python # For the first figure: square_area1 = calculate_area(4,4) ``` -![img](http://i.imgur.com/VyoJRAL.png) +![squares](http://i.imgur.com/VyoJRAL.png) -## 💡 Hint: +## 💡 Hints: + Call the `calculate_area` function three times, one per each square, passing the length and edge of each square. -+ :video_camera: [9 min video about functions in python](https://www.youtube.com/watch?v=NE97ylAnrz4) ++ 📹 [9 min video about functions in Python](https://www.youtube.com/watch?v=NE97ylAnrz4). From c822158e738d2f33464f3dadd2cc1891b9d3c3cb Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 22 Nov 2023 20:49:24 +0100 Subject: [PATCH 039/123] Update README.md --- exercises/04-Call-a-function/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/04-Call-a-function/README.md b/exercises/04-Call-a-function/README.md index f8ecbed..655e98d 100755 --- a/exercises/04-Call-a-function/README.md +++ b/exercises/04-Call-a-function/README.md @@ -6,7 +6,7 @@ tutorial: "https://www.youtube.com/watch?v=NU5iW_bWwmY" A function could receive zero parameters, and it always returns something, even if you don't explicitly add the `return` statement. -👉 [Click here to read more about functions](https://content.breatheco.de/lesson/working-with-functions-python) +👉 [Click here to read more about functions](https://content.breatheco.de/lesson/working-with-functions-python). For example: a function that calculates the area of a square will be something like this: From 42fffeedd371fd65a8f558a2d4b164fbc9612605 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 22 Nov 2023 20:49:58 +0100 Subject: [PATCH 040/123] Update README.md --- exercises/04-Call-a-function/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/04-Call-a-function/README.md b/exercises/04-Call-a-function/README.md index 655e98d..a0a8bee 100755 --- a/exercises/04-Call-a-function/README.md +++ b/exercises/04-Call-a-function/README.md @@ -6,7 +6,7 @@ tutorial: "https://www.youtube.com/watch?v=NU5iW_bWwmY" A function could receive zero parameters, and it always returns something, even if you don't explicitly add the `return` statement. -👉 [Click here to read more about functions](https://content.breatheco.de/lesson/working-with-functions-python). +👉 [Click here to read more about functions](https://4geeks.com/lesson/working-with-functions-python). For example: a function that calculates the area of a square will be something like this: From 2da7f65dd185a0476d985e5aa31ce70d3e8dee6e Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 22 Nov 2023 20:51:46 +0100 Subject: [PATCH 041/123] Update README.md --- exercises/04-Call-a-function/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/04-Call-a-function/README.md b/exercises/04-Call-a-function/README.md index a0a8bee..58e957f 100755 --- a/exercises/04-Call-a-function/README.md +++ b/exercises/04-Call-a-function/README.md @@ -38,7 +38,7 @@ area = calculate_area(3,6) square_area1 = calculate_area(4,4) ``` -![squares](http://i.imgur.com/VyoJRAL.png) +![Squares](http://i.imgur.com/VyoJRAL.png) ## 💡 Hints: From 772e9e5ab91c2b630b007869aa3b826b2eb5e437 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 22 Nov 2023 20:53:20 +0100 Subject: [PATCH 042/123] Update README.es.md --- exercises/04-Call-a-function/README.es.md | 28 +++++++++++------------ 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/exercises/04-Call-a-function/README.es.md b/exercises/04-Call-a-function/README.es.md index e04cd13..ae2c760 100644 --- a/exercises/04-Call-a-function/README.es.md +++ b/exercises/04-Call-a-function/README.es.md @@ -1,46 +1,46 @@ --- tutorial: "https://www.youtube.com/watch?v=NU5iW_bWwmY" --- -# `04` Llamando a una función +# `04` Calling a Function -Una función podría recibir 0 parámetros y tú puedes devolver algo siempre, incluso si no añades explícitamente el `return`. +Una función podría recibir 0 parámetros y devolverá algo siempre, incluso si no añades explícitamente el `return`. -:point_up: [Presiona aquí para saber más sobre funciones](https://content.breatheco.de/es/lesson/working-with-functions-python/) +👉 [Clic aquí para saber más sobre funciones](https://4geeks.com/es/lesson/working-with-functions-python-es). Por ejemplo, una función que calcula el área de un cuadrado sería algo como esto: ```python -def calculate_area(length, edge): - return length * edge +def calculate_area(length, width): + return length * width ``` -Si deseas usar esa función para calcular el área de un cuadrado con +Si deseas usar esa función para calcular el área de un cuadrado con: ```python length = 3 -edge = 6 +width = 6 ``` Tendrías que hacer algo como esto: ```python area = calculate_area(3,6) -# El valor del área es 18 +# El valor de 'area' sería 18 ``` ## 📝 Instrucciones: -1. Crea nuevas variables llamadas `squareArea1`, `square_area2`, `square_area3` y llama a la función `CalculateArea` 3 veces, un por cada cuadrado en la foto, utilizando las dimensiones de la figura, por ejemplo: +1. Crea nuevas variables llamadas `square_area1`, `square_area2`, `square_area3` y llama a la función `calculate_area` 3 veces, una por cada cuadrado en la foto, utilizando las dimensiones de la figura, por ejemplo: ```python -# para la primera figura: +# Para la primera figura: square_area1 = calculate_area(4,4) ``` -![img](http://i.imgur.com/VyoJRAL.png) +![Cuadrados](http://i.imgur.com/VyoJRAL.png) -## 💡 Pista: +## 💡 Pistas: -- Llama 3 veces a la función `calculate_area`, una por cada cuadrado, pasando la longitud y el borde de cada cuadrado. +- Llama 3 veces a la función `calculate_area`, una por cada cuadrado, pasando la longitud y el ancho de cada cuadrado. -+ :video_camera: [Video de 9 min sobre funciones en Python](https://www.youtube.com/watch?v=NE97ylAnrz4) ++ 📹 [Video de 9 min sobre funciones en Python](https://www.youtube.com/watch?v=NE97ylAnrz4). From 0b953a04cf4bf6d638b0fca22cdce03e4c1ace00 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 22 Nov 2023 20:54:11 +0100 Subject: [PATCH 043/123] Update app.py --- exercises/04-Call-a-function/app.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/exercises/04-Call-a-function/app.py b/exercises/04-Call-a-function/app.py index c856d48..0c131b3 100755 --- a/exercises/04-Call-a-function/app.py +++ b/exercises/04-Call-a-function/app.py @@ -1,4 +1,4 @@ -def calculate_area(length,edge): - return length * edge +def calculate_area(length, width): + return length * width -# Your code Below this line: \ No newline at end of file +# Your code below this line From 9a62da1023f42a9c460cbec66ec6d3f0fa7cdda5 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 22 Nov 2023 20:54:28 +0100 Subject: [PATCH 044/123] Update solution.hide.py --- exercises/04-Call-a-function/solution.hide.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/exercises/04-Call-a-function/solution.hide.py b/exercises/04-Call-a-function/solution.hide.py index d02eb4a..758b6e6 100644 --- a/exercises/04-Call-a-function/solution.hide.py +++ b/exercises/04-Call-a-function/solution.hide.py @@ -1,7 +1,7 @@ -def calculate_area(length,edge): - return length * edge +def calculate_area(length, width): + return length * width -# Your code Below this line: +# Your code below this line square_area1 = calculate_area(4,4) square_area2 = calculate_area(2,2) -square_area3 = calculate_area(5,5) \ No newline at end of file +square_area3 = calculate_area(5,5) From bc85b6558f504e99919af2b7e41d44a3e7ce74e4 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 22 Nov 2023 20:57:12 +0100 Subject: [PATCH 045/123] Update tests.py --- exercises/04-Call-a-function/tests.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/exercises/04-Call-a-function/tests.py b/exercises/04-Call-a-function/tests.py index 52dc7d3..3657291 100755 --- a/exercises/04-Call-a-function/tests.py +++ b/exercises/04-Call-a-function/tests.py @@ -1,6 +1,6 @@ import io, sys, pytest, os, re, mock -@pytest.mark.it("Create a function 'calculate_area'") +@pytest.mark.it("Create the function 'calculate_area'") def test_declare_variable(): path = os.path.dirname(os.path.abspath(__file__))+'/app.py' with open(path, 'r') as content_file: @@ -16,7 +16,7 @@ def test_for_callable(capsys, app): def test_for_integer(capsys, app): assert isinstance(app.calculate_area(3,4), int) -@pytest.mark.it('We tried the function sum with a=3 and b=4 and it did not return 7') +@pytest.mark.it('We tried the function sum with length=3 and width=4 and it did not return 12') def test_for_return(capsys, app): assert app.calculate_area(3,4) == 12 assert app.calculate_area(5,4) == 20 @@ -43,10 +43,10 @@ def test_for_square_area_value2(capsys, app): def test_for_square_area_value3(capsys, app): assert app.square_area3 == 25 -@pytest.mark.it("Create a function calculate_area must be called 3 times, one for each figure") +@pytest.mark.it("The function calculate_area must be called 3 times, one for each square") def test_call_calculate_area(): path = os.path.dirname(os.path.abspath(__file__))+'/app.py' with open(path, 'r') as content_file: content = content_file.read() regex = re.compile(r"=(\s*)calculate_area\s*\(") - assert bool(regex.search(content)) == True \ No newline at end of file + assert bool(regex.search(content)) == True From 221f1d2dbc9f69490754f3b2e665d3721077ef6c Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 22 Nov 2023 22:31:42 +0100 Subject: [PATCH 046/123] Update README.md --- .../README.md | 36 +++++++------------ 1 file changed, 13 insertions(+), 23 deletions(-) diff --git a/exercises/05-Defining-vs-Calling-a-function/README.md b/exercises/05-Defining-vs-Calling-a-function/README.md index 3a826e3..ae69c15 100755 --- a/exercises/05-Defining-vs-Calling-a-function/README.md +++ b/exercises/05-Defining-vs-Calling-a-function/README.md @@ -4,48 +4,38 @@ tutorial: "https://www.youtube.com/watch?v=fz4ttmwZWuc" # `05` Defining vs Calling a function -Functions will only exists if you or somebody else defines them... it is the only way the language compiler/interpreter knows they exist, therefore it's able to run them when you call them. +Functions will only exist if you or somebody else defines them; it is the only way the language compiler/interpreter knows they exist, therefore it's able to run them when you call them. -To define a function we need to write this basic code formula: +To define a function, we need to write this basic code formula: ```python -def myFunctionName(parameter, parameter2, ...parameterX): - # the function code here +def my_function_name(parameter1, parameter2, ...parameterX): + # The function code here return something ``` The word `def` is a reserved word in Python, this means it is only used to define a function. -**The name** of the function could be anything you like. -Tip: use a descriptive name (don't be cheap with words, -use as many as you need) this way you will understand what the function -does -and returns-. -Example names: add_two_integers , calculate_taxes , get_random_number, etc. +**The name** of the function could be anything you like. Tip: Use a descriptive name (don't be cheap with words, use as many as you need); this way, you will understand what the function does -and returns-. -**Parameters:** you can define as many parameters as you like or need. -The amount of parameters will depend on the operations done inside the function, -I.E: if the function is adding two integers `(3 + 4)` this means the function -will need two parameters (one for each integer). +Example names: `add_two_integers`, `calculate_taxes`, `get_random_number`, etc. -**Scope:** All the code that the function will contain need to be indented - one tab to the right, anything on a different indentation -won't be considered as part of the function, -this is called **the scope**, and it could be local (inside the function) -and global (outside of the function). +**Parameters:** You can define as many parameters as you like or need. The amount of parameters will depend on the operations done inside the function. I.E: If the function is adding two integers `(a + b)` this means the function will need two parameters (one for each integer). -**The Return**: not every function needs to return something, but it is recommended that it does. -Tip: returning `None` is a good default for when you, still, don't know if you need to return something. +**Scope:** All the code that the function will contain needs to be indented one tab to the right, anything on a different indentation won't be considered as part of the function. This is called **the scope**, and it could be local (inside the function) and global (outside the function). + +**The Return**: not every function needs to return something, but it is recommended that it does. Tip: returning `None` is a good default for when you still don't know if you need to return something. Example of a function: ```python def concatenate_number_to_string(local_number, local_string): - local_variable = local_string+""+str(local_number) + local_variable = local_string + str(local_number) return local_variable ``` -# 📝 Instructions: +## 📝 Instructions: 1. Define a function called `multi`. @@ -53,6 +43,6 @@ def concatenate_number_to_string(local_number, local_string): 3. Return the result of the multiplication between them. -## 💡 Hint +## 💡 Hint: + Remember to add the `return` line. Every function should return something, in this case it should be the result of the multiplication. From ddff8b17f44858f310477c9719744007d375175e Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 22 Nov 2023 22:32:11 +0100 Subject: [PATCH 047/123] Update README.md --- exercises/05-Defining-vs-Calling-a-function/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/05-Defining-vs-Calling-a-function/README.md b/exercises/05-Defining-vs-Calling-a-function/README.md index ae69c15..4d8287d 100755 --- a/exercises/05-Defining-vs-Calling-a-function/README.md +++ b/exercises/05-Defining-vs-Calling-a-function/README.md @@ -45,4 +45,4 @@ def concatenate_number_to_string(local_number, local_string): ## 💡 Hint: -+ Remember to add the `return` line. Every function should return something, in this case it should be the result of the multiplication. ++ Remember to add the `return` line. Every function should return something, in this case, it should be the result of the multiplication. From 1ab3115c68aeff5b97f52045d17bbdb333748c9f Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 22 Nov 2023 22:32:23 +0100 Subject: [PATCH 048/123] Update README.md --- exercises/05-Defining-vs-Calling-a-function/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/05-Defining-vs-Calling-a-function/README.md b/exercises/05-Defining-vs-Calling-a-function/README.md index 4d8287d..4d059b5 100755 --- a/exercises/05-Defining-vs-Calling-a-function/README.md +++ b/exercises/05-Defining-vs-Calling-a-function/README.md @@ -2,7 +2,7 @@ tutorial: "https://www.youtube.com/watch?v=fz4ttmwZWuc" --- -# `05` Defining vs Calling a function +# `05` Defining vs Calling a Function Functions will only exist if you or somebody else defines them; it is the only way the language compiler/interpreter knows they exist, therefore it's able to run them when you call them. From 6310ba496149e5f99ec5344ed436af29445d03e0 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 22 Nov 2023 22:38:58 +0100 Subject: [PATCH 049/123] Update README.es.md --- .../README.es.md | 20 +++++++++---------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/exercises/05-Defining-vs-Calling-a-function/README.es.md b/exercises/05-Defining-vs-Calling-a-function/README.es.md index d193398..0df4059 100644 --- a/exercises/05-Defining-vs-Calling-a-function/README.es.md +++ b/exercises/05-Defining-vs-Calling-a-function/README.es.md @@ -1,13 +1,13 @@ -# `05` Definir vs llamar a una función +# `05` Defining vs Calling a Function -Las funciones solo existen si tú u otra persona las define... es la única forma en que el compilador/intérprete de idiomas sabe que existen, por lo tanto, puede ejecutarlas cuando las llama. +Las funciones solo existen si tú u otra persona las define... es la única forma en que el compilador/intérprete de lenguaje sabe que existen, por lo tanto, puede ejecutarlas cuando las llamas. Para definir una función necesitamos escribir esta fórmula básica de código: ```python -def myFunctionName(parameter, parameter2, ...parameterX): - # codigo de la función aquí - return something +def nombre_de_funcion(parametro1, parametro2, ...parametroX): + # Código de la función aquí + return algo ``` La palabra `def` es una palabra reservada en Python, esto significa que solo se usa para definir una función. @@ -16,13 +16,11 @@ La palabra `def` es una palabra reservada en Python, esto significa que solo se *Consejo:* usa un nombre descriptivo (no intentes ahorrar palabras, usa tantas como necesites) de esta manera entenderás lo que hace la función (y lo que devuelve). -Nombres de ejemplo: `add_two_integers` (suma dos números enteros), `calculate_taxes` (calcular impuestos) , `get_random_number` (obtener número aleatorio), etc. +Nombres de ejemplo: `add_two_integers` (suma dos números enteros), `calculate_taxes` (calcular impuestos), `get_random_number` (obtener número aleatorio), etc. -**Parámetros:** puedes definir tantos parámetros como desees, más aún, si los necesitas. +**Parámetros:** puedes definir tantos parámetros como desees, más aún, si los necesitas. La cantidad de parámetros dependerá de las operaciones realizadas dentro de la función. -La cantidad de parámetros dependerá de las operaciones realizadas dentro de la función. - -Ejemplo: si la función está sumando dos enteros (3 + 4), esto significa que la función necesitará dos parámetros (uno para cada entero). +Ejemplo: si la función está sumando dos enteros (a + b), esto significa que la función necesitará dos parámetros (uno para cada entero). **Alcance:** Todo el código que contenga la función debe tener una sangría a la derecha, todo lo que esté en una sangría diferente no será considerado como parte de la función, a esto se llama **alcance**, y puede ser local (dentro de la función) y global (fuera de la función). @@ -34,7 +32,7 @@ Ejemplo de una función: ```python def concatenate_number_to_string(local_number, local_string): - local_variable = local_string+""+str(local_number) + local_variable = local_string + str(local_number) return local_variable ``` From 7e81a0ac3fc78e8066fdb9075372527df765a515 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 22 Nov 2023 22:39:34 +0100 Subject: [PATCH 050/123] Update app.py --- exercises/05-Defining-vs-Calling-a-function/app.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/exercises/05-Defining-vs-Calling-a-function/app.py b/exercises/05-Defining-vs-Calling-a-function/app.py index 79b86d8..eedeae6 100755 --- a/exercises/05-Defining-vs-Calling-a-function/app.py +++ b/exercises/05-Defining-vs-Calling-a-function/app.py @@ -1,5 +1,5 @@ -# Define the function called "multi" that expects 2 parameters: +# Define below the function called "multi" that expects 2 parameters -# don't edit anything below this line +# Don't edit anything below this line return_value = multi(7,53812212) -print(return_value) \ No newline at end of file +print(return_value) From 473ab8f8b838709b30cca9a80c930d34759f2a72 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 22 Nov 2023 22:40:39 +0100 Subject: [PATCH 051/123] Update solution.hide.py --- .../05-Defining-vs-Calling-a-function/solution.hide.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/exercises/05-Defining-vs-Calling-a-function/solution.hide.py b/exercises/05-Defining-vs-Calling-a-function/solution.hide.py index 6a28c77..afa0209 100644 --- a/exercises/05-Defining-vs-Calling-a-function/solution.hide.py +++ b/exercises/05-Defining-vs-Calling-a-function/solution.hide.py @@ -1,9 +1,7 @@ -# Define the function called "multi" that expects 2 parameters: -def multi(num1 , num2): +# Define below the function called "multi" that expects 2 parameters +def multi(num1, num2): total = num1 * num2 return total - - -# don't edit anything below this line +# Don't edit anything below this line return_value = multi(7,53812212) -print(return_value) \ No newline at end of file +print(return_value) From 8bfb20273373895ed48f5d04ef29377f7ced1902 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 22 Nov 2023 22:41:23 +0100 Subject: [PATCH 052/123] Update tests.py --- exercises/05-Defining-vs-Calling-a-function/tests.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/exercises/05-Defining-vs-Calling-a-function/tests.py b/exercises/05-Defining-vs-Calling-a-function/tests.py index 35f9e6c..ab63ea7 100755 --- a/exercises/05-Defining-vs-Calling-a-function/tests.py +++ b/exercises/05-Defining-vs-Calling-a-function/tests.py @@ -1,6 +1,6 @@ import io, sys, pytest, os, re, mock -@pytest.mark.it("Create a function 'multi'") +@pytest.mark.it("Create the function 'multi'") def test_declare_variable(): path = os.path.dirname(os.path.abspath(__file__))+'/app.py' with open(path, 'r') as content_file: @@ -20,6 +20,6 @@ def test_for_return_something(capsys, app): def test_for_integer(capsys, app): assert app.multi(3,4) == 12 -@pytest.mark.it('The function multi must receive two numbers and return their multiplication. Testing with different values.') +@pytest.mark.it('The function multi must receive two numbers and return their multiplication. Testing with different values') def test_for_function_return(capsys, app): - assert app.multi(10, 6) == 60 \ No newline at end of file + assert app.multi(10, 6) == 60 From e20ebf2279940cba34be7b8e0f557ed020d17b10 Mon Sep 17 00:00:00 2001 From: Tomas Gonzalez <56565994+tommygonzaleza@users.noreply.github.com> Date: Tue, 28 Nov 2023 08:46:04 -0400 Subject: [PATCH 053/123] Added intro video --- learn.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/learn.json b/learn.json index 73fe16d..4786842 100644 --- a/learn.json +++ b/learn.json @@ -1,4 +1,5 @@ { + "intro": "https://youtu.be/GjQEotj3t6Y?si=cVWLDw5H_FcdOrIY", "title": { "us": "Learn Python Functions Interactively", "es": "Aprende las funciones de Python Interactivamente" @@ -7,7 +8,7 @@ "repository": "https://github.com/4GeeksAcademy/python-functions-programming-exercises", "preview": "https://github.com/4GeeksAcademy/python-functions-programming-exercises/blob/master/preview.gif?raw=true", "description": { - "us": "Learn and master functional programing by doing auto-graded interactive exercises.", + "us": "Learn and master functional programming by doing auto-graded interactive exercises.", "es": "Aprende y domina funciones en Python haciendo ejercicios interactivos y auto-evaluados." }, "duration": 10, From b3fbd36b343c04f7c76e48fd09e7ad4ee83b8bc9 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 29 Nov 2023 01:49:37 +0100 Subject: [PATCH 054/123] Update README.es.md --- exercises/06-lambda-functions/README.es.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/exercises/06-lambda-functions/README.es.md b/exercises/06-lambda-functions/README.es.md index a12cdf6..fa629e3 100644 --- a/exercises/06-lambda-functions/README.es.md +++ b/exercises/06-lambda-functions/README.es.md @@ -5,15 +5,15 @@ Una **función lambda** es una función con solo una línea de código y sin nom Es un tipo de función muy especial en el mundo Python porque puedes usarla como una 'pequeña utilidad' para una programación muy ágil: ```python -# declarando una función normal para una multiplicación +# Declarando una función normal para una multiplicación def multiply(p1, p2): return p1 * p2 -# declarándola en una línea como una función lambda +# Declarándola en una línea como una función lambda multiply = lambda p1,p2: p1 * p2 ``` -1. Las **funciones lambda** tiene que ser siempre muy pequeñas. +1. Las **funciones lambda** tienen que ser siempre muy pequeñas. 2. Las **funciones lambda** pueden tener únicamente una línea. @@ -26,14 +26,14 @@ multiply = lambda p1,p2: p1 * p2 1. Crea una variable llamada `is_odd`. -2. Asígnale una función lambda que devuelva `True` o `False` dependiendo de si un número dado es impar o no. +2. Asígnale una función **lambda** que devuelva `True` o `False` dependiendo de si un número dado es impar o no. ## 💡 Pista: + Así es como declararías una función normal: ```python -# Esta función retorna `True` si el número es impar +# Esta función retorna "True" si el número es impar def is_odd(num): return (num % 2) != 0 ``` From a96cd3548897a2042639c9cdde5444dd9a8aba22 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 29 Nov 2023 01:50:45 +0100 Subject: [PATCH 055/123] Update README.es.md --- exercises/06-lambda-functions/README.es.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/06-lambda-functions/README.es.md b/exercises/06-lambda-functions/README.es.md index fa629e3..97b1343 100644 --- a/exercises/06-lambda-functions/README.es.md +++ b/exercises/06-lambda-functions/README.es.md @@ -1,4 +1,4 @@ -# `06` Funciones Lambda en Python +# `06` Lambda Functions in Python Una **función lambda** es una función con solo una línea de código y sin nombre. From 117bc32069eb067cc1c4b28517ddd93ed723af48 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 29 Nov 2023 01:56:20 +0100 Subject: [PATCH 056/123] Update README.md --- exercises/06-lambda-functions/README.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/exercises/06-lambda-functions/README.md b/exercises/06-lambda-functions/README.md index dd38458..202169f 100755 --- a/exercises/06-lambda-functions/README.md +++ b/exercises/06-lambda-functions/README.md @@ -3,29 +3,29 @@ tutorial: "https://www.youtube.com/watch?v=HACQ9uerCuE" --- -# `06` Lambda functions in Python +# `06` Lambda Functions in Python A **lambda function** is a function with just one line of code and no name. -It is a very special type of funcion in the world of python because you can use it as a small utility for very agile coding: +It is a very special type of function in the world of Python because you can use it as a small utility for very agile coding: ```python -# declaring a normal funcion for multiplication +# Declaring a normal function for multiplication def multiply(p1, p2): return p1 * p2 -# declaring it now like a one line lambda +# Declaring it now like a one line lambda function multiply = lambda p1,p2: p1 * p2 ``` -:point_uo:Facts: +👉 Facts: -+ **Lambda fuctions** have to be always very small. ++ **Lambda functions** have to always be very small. -+ **Lambda function** can only have one line. ++ **Lambda functions** can only have one line. -+ **Lambda function** doesn't need a `return` statement (it is assumed that it will return whatever is on that one line). ++ **Lambda functions** don't need a `return` statement (it is assumed that it will return whatever is on that one line). -+ **Lambda functions** can be stored in variables or passed as parameters to another function ++ **Lambda functions** can be stored in variables or passed as parameters to another function. ## 📝 Instructions: @@ -33,12 +33,12 @@ multiply = lambda p1,p2: p1 * p2 2. Assign a **lambda function** to it that returns `True` or `False` if a given number is odd. -## 💡Hint +## 💡 Hint + Here is how you would declare it like a normal function: ```py -# this function return True if a number is odd. +# This function returns True if a number is odd. def is_odd(num): return num % 2 != 0 ``` From b8b422f36ff51612dd2a3ca976630e5b280a64a2 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 29 Nov 2023 01:56:41 +0100 Subject: [PATCH 057/123] Update README.md --- exercises/06-lambda-functions/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/exercises/06-lambda-functions/README.md b/exercises/06-lambda-functions/README.md index 202169f..49de6bc 100755 --- a/exercises/06-lambda-functions/README.md +++ b/exercises/06-lambda-functions/README.md @@ -17,6 +17,7 @@ def multiply(p1, p2): # Declaring it now like a one line lambda function multiply = lambda p1,p2: p1 * p2 ``` + 👉 Facts: + **Lambda functions** have to always be very small. @@ -38,7 +39,7 @@ multiply = lambda p1,p2: p1 * p2 + Here is how you would declare it like a normal function: ```py -# This function returns True if a number is odd. +# This function returns True if a number is odd def is_odd(num): return num % 2 != 0 ``` From e1d8fe2b1bc5e6778af6ed68dd0251b631aafe6a Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 29 Nov 2023 01:57:32 +0100 Subject: [PATCH 058/123] Update README.es.md --- exercises/06-lambda-functions/README.es.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/exercises/06-lambda-functions/README.es.md b/exercises/06-lambda-functions/README.es.md index 97b1343..40dcd34 100644 --- a/exercises/06-lambda-functions/README.es.md +++ b/exercises/06-lambda-functions/README.es.md @@ -2,7 +2,7 @@ Una **función lambda** es una función con solo una línea de código y sin nombre. -Es un tipo de función muy especial en el mundo Python porque puedes usarla como una 'pequeña utilidad' para una programación muy ágil: +Es un tipo de función muy especial en el mundo Python porque puedes usarla como una pequeña utilidad para una programación muy ágil: ```python # Declarando una función normal para una multiplicación @@ -13,13 +13,15 @@ def multiply(p1, p2): multiply = lambda p1,p2: p1 * p2 ``` -1. Las **funciones lambda** tienen que ser siempre muy pequeñas. +### 👉 Caracteristicas: -2. Las **funciones lambda** pueden tener únicamente una línea. ++ Las **funciones lambda** tienen que ser siempre muy pequeñas. -3. Las **funciones lambda** no necesitan un `return`, se asume que lo que haya en esa línea devolverá un valor. ++ Las **funciones lambda** pueden tener únicamente una línea. -4. Las **funciones lambda** pueden almacenarse en variables o ser pasadas como parámetro a otra función. ++ Las **funciones lambda** no necesitan un `return`, se asume que lo que haya en esa línea devolverá un valor. + ++ Las **funciones lambda** pueden almacenarse en variables o ser pasadas como parámetro a otra función. ## 📝 Instrucciones: From 4ed891992ac1299006f3d15e0f1cac964769766a Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 29 Nov 2023 01:57:39 +0100 Subject: [PATCH 059/123] Update README.md --- exercises/06-lambda-functions/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/06-lambda-functions/README.md b/exercises/06-lambda-functions/README.md index 49de6bc..771ef04 100755 --- a/exercises/06-lambda-functions/README.md +++ b/exercises/06-lambda-functions/README.md @@ -18,7 +18,7 @@ def multiply(p1, p2): multiply = lambda p1,p2: p1 * p2 ``` -👉 Facts: +### 👉 Facts: + **Lambda functions** have to always be very small. From d0061978a58be20b78356d4e34a1c7350789ef8c Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 29 Nov 2023 01:58:15 +0100 Subject: [PATCH 060/123] Update app.py --- exercises/06-lambda-functions/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/06-lambda-functions/app.py b/exercises/06-lambda-functions/app.py index e59626e..b4ac556 100755 --- a/exercises/06-lambda-functions/app.py +++ b/exercises/06-lambda-functions/app.py @@ -1,2 +1,2 @@ -# your function here +# Your function here From e1585015c20166dd3767800809e99ad01ccf7ff5 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 29 Nov 2023 01:59:29 +0100 Subject: [PATCH 061/123] Update tests.py --- exercises/06-lambda-functions/tests.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/exercises/06-lambda-functions/tests.py b/exercises/06-lambda-functions/tests.py index bce6293..aa3054a 100755 --- a/exercises/06-lambda-functions/tests.py +++ b/exercises/06-lambda-functions/tests.py @@ -1,6 +1,6 @@ import io, sys, pytest, os, re, mock -@pytest.mark.it("Declare a function 'is_odd' as lambda") +@pytest.mark.it("Declare a function called 'is_odd' as lambda") def test_declare_variable(): path = os.path.dirname(os.path.abspath(__file__))+'/app.py' with open(path, 'r') as content_file: @@ -13,7 +13,7 @@ def test_for_callable(capsys): import app as app assert callable(app.is_odd) -@pytest.mark.it('The function is_odd must receive one number and return true if is odd or false otherwise') +@pytest.mark.it('The function is_odd must receive one number and return True if the number is odd or False otherwise') def test_for_integer(capsys): import app as app assert app.is_odd(3) == True @@ -21,4 +21,4 @@ def test_for_integer(capsys): @pytest.mark.it('We tested the function with 2 and the result was not False') def test_for_integer2(capsys): import app as app - assert app.is_odd(2) == False \ No newline at end of file + assert app.is_odd(2) == False From f7e459f220fd7dd3c93284fb5884c139d969db9b Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 29 Nov 2023 01:59:44 +0100 Subject: [PATCH 062/123] Update tests.py --- exercises/06-lambda-functions/tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/06-lambda-functions/tests.py b/exercises/06-lambda-functions/tests.py index aa3054a..8b8655b 100755 --- a/exercises/06-lambda-functions/tests.py +++ b/exercises/06-lambda-functions/tests.py @@ -8,7 +8,7 @@ def test_declare_variable(): regex = re.compile(r"is_odd(\s*)=(\s*)lambda") assert bool(regex.search(content)) == True -@pytest.mark.it('The function is_odd must exist') +@pytest.mark.it("The function 'is_odd' must exist") def test_for_callable(capsys): import app as app assert callable(app.is_odd) From 0d2ba13d13a2ef4b5c6a90e5f7e4358225e36476 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 29 Nov 2023 02:00:13 +0100 Subject: [PATCH 063/123] Update tests.py --- exercises/06-lambda-functions/tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/06-lambda-functions/tests.py b/exercises/06-lambda-functions/tests.py index 8b8655b..aa3054a 100755 --- a/exercises/06-lambda-functions/tests.py +++ b/exercises/06-lambda-functions/tests.py @@ -8,7 +8,7 @@ def test_declare_variable(): regex = re.compile(r"is_odd(\s*)=(\s*)lambda") assert bool(regex.search(content)) == True -@pytest.mark.it("The function 'is_odd' must exist") +@pytest.mark.it('The function is_odd must exist') def test_for_callable(capsys): import app as app assert callable(app.is_odd) From 0de3fbff5bf6e718f96e76b2f3ac07e59b367afa Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 29 Nov 2023 02:01:52 +0100 Subject: [PATCH 064/123] Create solution.hide.py --- exercises/06-lambda-functions/solution.hide.py | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 exercises/06-lambda-functions/solution.hide.py diff --git a/exercises/06-lambda-functions/solution.hide.py b/exercises/06-lambda-functions/solution.hide.py new file mode 100644 index 0000000..f134619 --- /dev/null +++ b/exercises/06-lambda-functions/solution.hide.py @@ -0,0 +1,3 @@ +# Your function here + +is_odd = lambda num: num % 2 != 0 From 7877337c6b1f88c93ebd701e624c0c3bdc08a1d3 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 29 Nov 2023 02:05:52 +0100 Subject: [PATCH 065/123] Update README.md --- exercises/07-lambda-function-two/README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/exercises/07-lambda-function-two/README.md b/exercises/07-lambda-function-two/README.md index 69fa2ce..8659fd1 100755 --- a/exercises/07-lambda-function-two/README.md +++ b/exercises/07-lambda-function-two/README.md @@ -2,23 +2,23 @@ tutorial: "https://www.youtube.com/watch?v=1HwmTkQPeMo" --- -# `07` Lambda functions +# `07` Lambda Functions -**:point_up: Remember:** +### ☝ Remember: Lambda functions allows a short syntax for writing function expressions. ```python -multy = lambda x, y: x * y -print(multy(2,2)) +multi = lambda x, y: x * y +print(multi(2,2)) ``` ## 📝 Instructions: -1. Create a lambda function called `rapid` it will take one string parameter. +1. Create a lambda function called `rapid`, which will take one string parameter. 2. Return the same string with the last letter removed. -## 💡 Hint +## 💡 Hint: -+ Google how to "remove last letter form string python" (you can use the square brackets). ++ Google "how to remove last letter from string python" (you can use the square brackets). From 7c657c271daf6e1c22cd68048a73943677b3b369 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 29 Nov 2023 02:06:37 +0100 Subject: [PATCH 066/123] Update README.md --- exercises/07-lambda-function-two/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/07-lambda-function-two/README.md b/exercises/07-lambda-function-two/README.md index 8659fd1..dcad70e 100755 --- a/exercises/07-lambda-function-two/README.md +++ b/exercises/07-lambda-function-two/README.md @@ -6,7 +6,7 @@ tutorial: "https://www.youtube.com/watch?v=1HwmTkQPeMo" ### ☝ Remember: -Lambda functions allows a short syntax for writing function expressions. +Lambda functions allow a short syntax for writing function expressions. ```python multi = lambda x, y: x * y From 7f5cc84ec62cbe5d234a2001ab9377f99e0b7233 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 29 Nov 2023 02:10:39 +0100 Subject: [PATCH 067/123] Update README.es.md --- exercises/07-lambda-function-two/README.es.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/exercises/07-lambda-function-two/README.es.md b/exercises/07-lambda-function-two/README.es.md index e9f470b..53c054e 100644 --- a/exercises/07-lambda-function-two/README.es.md +++ b/exercises/07-lambda-function-two/README.es.md @@ -1,13 +1,12 @@ -# `07` Funciones Lambda +# `07` Lambda Functions - -**:point_up: Recuerda:** +### ☝ Recuerda: Las funciones Lambda permiten una sintaxis corta para escribir expresiones de funciones. ```python -multy = lambda x, y: x * y -print(multy(2,2)) +multi = lambda x, y: x * y +print(multi(2,2)) ``` ## 📝 Instrucciones: @@ -18,4 +17,4 @@ print(multy(2,2)) ## 💡 Pista: -+ Busca en Google "remove last letter form string python" (puedes usar los corchetes). ++ Busca en Google "como eliminar el último caracter de un string python" (puedes usar los corchetes). From a18d892882154e6a8ec105afbc9a1ef2e3a012bf Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 29 Nov 2023 02:11:54 +0100 Subject: [PATCH 068/123] Update app.py --- exercises/07-lambda-function-two/app.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/exercises/07-lambda-function-two/app.py b/exercises/07-lambda-function-two/app.py index fca265d..a156102 100755 --- a/exercises/07-lambda-function-two/app.py +++ b/exercises/07-lambda-function-two/app.py @@ -1,5 +1,5 @@ -# From this line above, plese do not change code below -print(rapid("bob")) #should print bo \ No newline at end of file +# Your code above, please do not change code below +print(rapid("bob")) # Should print "bo" From 0280a20f6b0b4bfed844a0406bedef1a1f0c67bc Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 29 Nov 2023 02:14:22 +0100 Subject: [PATCH 069/123] Update solution.hide.py --- exercises/07-lambda-function-two/solution.hide.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/exercises/07-lambda-function-two/solution.hide.py b/exercises/07-lambda-function-two/solution.hide.py index 963f084..ecfc065 100644 --- a/exercises/07-lambda-function-two/solution.hide.py +++ b/exercises/07-lambda-function-two/solution.hide.py @@ -1,5 +1,4 @@ rapid = lambda myStr: myStr[:-1] - -# From this line above, plese do not change code below -print(rapid("bob")) #should print bo \ No newline at end of file +# Your code above, please do not change code below +print(rapid("bob")) # Should print "bo" From daa03e4b741f1daca80b997194fdcc5580132b58 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 29 Nov 2023 02:16:33 +0100 Subject: [PATCH 070/123] Update tests.py --- exercises/07-lambda-function-two/tests.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/exercises/07-lambda-function-two/tests.py b/exercises/07-lambda-function-two/tests.py index 39787f2..7b6a474 100755 --- a/exercises/07-lambda-function-two/tests.py +++ b/exercises/07-lambda-function-two/tests.py @@ -1,6 +1,6 @@ import io, sys, pytest, os, re, mock -@pytest.mark.it("Declare a function 'rapid' as lambda") +@pytest.mark.it("Declare a function called 'rapid' as lambda") def test_declare_variable(): path = os.path.dirname(os.path.abspath(__file__))+'/app.py' with open(path, 'r') as content_file: @@ -12,7 +12,7 @@ def test_declare_variable(): def test_for_callable(capsys): from app import rapid -@pytest.mark.it('The function rapid must receive one string and return the same but without the last letter (make sure it\'s lowecase)') +@pytest.mark.it('The function rapid must receive one string and return the same string without the last character') def test_for_integer(capsys): from app import rapid assert rapid("maria") == "mari" From 44a898b1fb9d4354a653438a3e25fc4f5732e80c Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 29 Nov 2023 02:29:44 +0100 Subject: [PATCH 071/123] Update README.md --- exercises/08-Function-that-returns/README.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/exercises/08-Function-that-returns/README.md b/exercises/08-Function-that-returns/README.md index cd56ca6..b84d2e1 100755 --- a/exercises/08-Function-that-returns/README.md +++ b/exercises/08-Function-that-returns/README.md @@ -8,18 +8,17 @@ It is very good practice that all functions return something, even if it is `Non With what your function returns, you can create algorithms that use multiple functions at the same time. -For example, in this particular case we have two functions available: +For example, in this particular case, we have two functions available: + `dollar_to_euro`: that calculates the value in euros of a given value in dollars. + `euro_to_yen`: calculates the value in yen of a given value in euros. - ## 📝 Instructions: 1. Using the two functions available, print on the console the value of **137** dollars in yen. -## 💡 Hint +## 💡 Hint: Working backwards: @@ -27,4 +26,4 @@ Working backwards: - Our available function `euro_to_yen` will provide that. -- To get to euro we will use the available function `dollar_to_euro`. +- To get the euros, we will use the available function `dollar_to_euro`. From 930f773763975a9a27c2de8f13d70707c51f5da0 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 29 Nov 2023 02:31:16 +0100 Subject: [PATCH 072/123] Update README.md --- exercises/08-Function-that-returns/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/08-Function-that-returns/README.md b/exercises/08-Function-that-returns/README.md index b84d2e1..1f4a6d7 100755 --- a/exercises/08-Function-that-returns/README.md +++ b/exercises/08-Function-that-returns/README.md @@ -18,7 +18,7 @@ For example, in this particular case, we have two functions available: 1. Using the two functions available, print on the console the value of **137** dollars in yen. -## 💡 Hint: +## 💡 Hints: Working backwards: From 08490fe19fb2e69260a6b1742158f3cf632aacad Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 29 Nov 2023 02:32:18 +0100 Subject: [PATCH 073/123] Update README.es.md --- exercises/08-Function-that-returns/README.es.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/exercises/08-Function-that-returns/README.es.md b/exercises/08-Function-that-returns/README.es.md index cd6fd25..add2e88 100644 --- a/exercises/08-Function-that-returns/README.es.md +++ b/exercises/08-Function-that-returns/README.es.md @@ -1,8 +1,10 @@ -# `08` Funciones que devuelven +# `08` Functions that return Es una muy buena práctica que las funciones devuelvan algo, incluso si es `None`. -Si tus funciones devuelven algo, puedes crear algoritmos que usen muchas funciones al mismo tiempo. Por ejemplo, en este caso en particular tenemos dos funciones disponibles: +Si tus funciones devuelven algo, puedes crear algoritmos que usen muchas funciones al mismo tiempo. + +Por ejemplo, en este caso en particular tenemos dos funciones disponibles: + `dollar_to_euro`: que calcula el valor en euros de un valor dado en dólares. @@ -12,12 +14,12 @@ Si tus funciones devuelven algo, puedes crear algoritmos que usen muchas funcion 1. Utilizando las dos funciones disponibles, imprime en la consola el valor de **137** dólares en yenes. -## 💡 Pista: +## 💡 Pistas: -Trabajando al revés: +Trabajando desde el final: - Nuestro valor esperado está en yenes. - Nuestra función disponible `euro_to_yen` proporcionará eso. -- Para llegar al euro utilizaremos la función disponible `dollar_to_euro`. \ No newline at end of file +- Para llegar al euro utilizaremos la función disponible `dollar_to_euro`. From eaefd88b6d4fec91a545ffe8b80e167f2b6891a6 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 29 Nov 2023 02:34:31 +0100 Subject: [PATCH 074/123] Update app.py --- exercises/08-Function-that-returns/app.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/exercises/08-Function-that-returns/app.py b/exercises/08-Function-that-returns/app.py index 44ab611..fc81947 100755 --- a/exercises/08-Function-that-returns/app.py +++ b/exercises/08-Function-that-returns/app.py @@ -1,7 +1,7 @@ def dollar_to_euro(dollar_value): - return dollar_value * 0.89 + return dollar_value * 0.91 def euro_to_yen(euro_value): - return euro_value * 124.15 + return euro_value * 161.70 -####### ↓ YOUR CODE BELOW ↓ ####### \ No newline at end of file +####### ↓ YOUR CODE BELOW ↓ ####### From 50e2eec84f45f9ae1388ac79513a56d3cca19794 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 29 Nov 2023 02:35:17 +0100 Subject: [PATCH 075/123] Update test.py --- exercises/08-Function-that-returns/test.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/exercises/08-Function-that-returns/test.py b/exercises/08-Function-that-returns/test.py index 812e1c7..f45e234 100755 --- a/exercises/08-Function-that-returns/test.py +++ b/exercises/08-Function-that-returns/test.py @@ -1,6 +1,6 @@ import io, sys, pytest, os, re, mock -@pytest.mark.it("Call the function dollar_to_euro passing the 137 dollars to get the amount in Euro") +@pytest.mark.it("Call the function dollar_to_euro passing 137 dollars to get the amount in Euros") def test_declare_variable(): path = os.path.dirname(os.path.abspath(__file__))+'/app.py' with open(path, 'r') as content_file: @@ -9,7 +9,7 @@ def test_declare_variable(): assert bool(regex.search(content)) == True -@pytest.mark.it("Call the function euro_to_yen passing the Euro converted amount to get the amount in Yen") +@pytest.mark.it("Call the function euro_to_yen passing the Euros converted amount to get the amount in Yen") def test_euro_to_yen(): path = os.path.dirname(os.path.abspath(__file__))+'/app.py' with open(path, 'r') as content_file: @@ -22,4 +22,4 @@ def test_euro_to_yen(): def test_for_file_output(capsys): import app captured = capsys.readouterr() - assert "15137.609500000002\n" == captured.out \ No newline at end of file + assert "20159.139\n" == captured.out From 114310ed2d5692d2b28fe5a033b2ef84735af473 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 29 Nov 2023 02:40:17 +0100 Subject: [PATCH 076/123] Create solution.hide.py --- exercises/08-Function-that-returns/solution.hide.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 exercises/08-Function-that-returns/solution.hide.py diff --git a/exercises/08-Function-that-returns/solution.hide.py b/exercises/08-Function-that-returns/solution.hide.py new file mode 100644 index 0000000..82ee742 --- /dev/null +++ b/exercises/08-Function-that-returns/solution.hide.py @@ -0,0 +1,12 @@ +def dollar_to_euro(dollar_value): + return dollar_value * 0.91 + +def euro_to_yen(euro_value): + return euro_value * 161.70 + +####### ↓ YOUR CODE BELOW ↓ ####### + +euros = dollar_to_euro(137) +yen = euro_to_yen(euros) + +print(yen) From 989a756e22cbb997f75894a7d9561cfd2fbb9736 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 29 Nov 2023 02:50:56 +0100 Subject: [PATCH 077/123] Update README.md --- exercises/09-Function-parameters/README.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/exercises/09-Function-parameters/README.md b/exercises/09-Function-parameters/README.md index 1301c1a..d8a4321 100755 --- a/exercises/09-Function-parameters/README.md +++ b/exercises/09-Function-parameters/README.md @@ -6,18 +6,20 @@ tutorial: "https://www.youtube.com/watch?v=uaiDxW4LJNA" You can specify as many parameters as you want in a function. -As a developer you are going to find functions with even 6 or 7 parameters all the time. +As a developer, you are going to find functions with even 6 or 7 parameters all the time. The names of the parameters don't matter, but you have to be **as explicit as you can** because these names will give clues to the other developers (or yourself in the future) about what is each parameter about. ## 📝 Instructions: -1. Please write the `render_person` function required to print a a string like the following: +1. Please write the `render_person` function required to print a string like the following: -```py +```text Bob is a 23 years old male born in 05/22/1983 with green eyes ``` -## 💡 Hint +## 💡 Hints: + You have to do some string concatenation and return that string. + ++ Also, you can Google "how to insert variables into a string python". From cecf0db8be1200824fe3c0f7f172d168988d904d Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 29 Nov 2023 02:54:03 +0100 Subject: [PATCH 078/123] Update README.es.md --- exercises/09-Function-parameters/README.es.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/exercises/09-Function-parameters/README.es.md b/exercises/09-Function-parameters/README.es.md index 6500706..98c3c7d 100644 --- a/exercises/09-Function-parameters/README.es.md +++ b/exercises/09-Function-parameters/README.es.md @@ -1,4 +1,4 @@ -# `09` Parámetros de funciones +# `09` Function parameters Puedes especificar tantos parámetros como desees en una función. @@ -10,10 +10,12 @@ Los nombres de los parámetros no importan, pero debe ser **lo más explícito p + Escribe la función `render_person` requerida para imprimir un string como el siguiente: -```py +```text Bob is a 23 years old male born in 05/22/1983 with green eyes ``` -## 💡 Pista +## 💡 Pistas: -- Tienes que hacer una concatenación de string y devolver ese string. ++ Tienes que hacer una concatenación de string y devolver ese string. + ++ También, puedes buscar en Google "como insertar variables en un string python". From 71fe9b01f1c22db7b559d6274913d77225342191 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 29 Nov 2023 02:57:29 +0100 Subject: [PATCH 079/123] Update solution.hide.py --- exercises/09-Function-parameters/solution.hide.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/exercises/09-Function-parameters/solution.hide.py b/exercises/09-Function-parameters/solution.hide.py index 71e6d5f..1b50585 100644 --- a/exercises/09-Function-parameters/solution.hide.py +++ b/exercises/09-Function-parameters/solution.hide.py @@ -1,7 +1,7 @@ # Your code goes here: -def render_person(name, birthdate, eye_color, age, sex): - return name +" is a "+ str(age) +" years old " + sex +" born in " + birthdate + " with "+eye_color +" eyes" +def render_person(name, birth_date, eye_color, age, gender): + return name + " is a " + str(age) + " years old " + gender + " born in " + birth_date + " with " + eye_color + " eyes" # Do not edit below this line -print(render_person('Bob', '05/22/1983', 'green', 23, 'male')) \ No newline at end of file +print(render_person('Bob', '05/22/1983', 'green', 23, 'male')) From af4d5fd3997409841f39089238d31f0b173ea764 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 29 Nov 2023 02:59:05 +0100 Subject: [PATCH 080/123] Update README.es.md --- exercises/09-Function-parameters/README.es.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/09-Function-parameters/README.es.md b/exercises/09-Function-parameters/README.es.md index 98c3c7d..ca03d09 100644 --- a/exercises/09-Function-parameters/README.es.md +++ b/exercises/09-Function-parameters/README.es.md @@ -8,7 +8,7 @@ Los nombres de los parámetros no importan, pero debe ser **lo más explícito p ## 📝 Instrucciones: -+ Escribe la función `render_person` requerida para imprimir un string como el siguiente: +1. Escribe la función `render_person` requerida para imprimir un string como el siguiente: ```text Bob is a 23 years old male born in 05/22/1983 with green eyes From 91c9d46426d430b76e4c84280ad6ca4ffec0dfd6 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 29 Nov 2023 03:05:01 +0100 Subject: [PATCH 081/123] Update README.md --- exercises/10-Array-Methods/README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/exercises/10-Array-Methods/README.md b/exercises/10-Array-Methods/README.md index 26cc991..950a653 100755 --- a/exercises/10-Array-Methods/README.md +++ b/exercises/10-Array-Methods/README.md @@ -2,16 +2,15 @@ tutorial: "https://www.youtube.com/watch?v=jBXve_vh7dU" --- - # `10` List Methods ## 📝 Instructions: 1. Write a function called `sort_names` that, given a list of names, returns them in alphabetical order. -## 💡 Hint +## 💡 Hints: -+ Every list comes with default functions that allows sorting- use it inside your function! ++ Every list comes with default functions that allow sorting - use it inside your function! + Stuck on sorting? Read W3 Schools page on sorting lists: From a5eafd979df694a429b62f8a0b9ae9fe83c63632 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 29 Nov 2023 03:06:55 +0100 Subject: [PATCH 082/123] Update README.md --- exercises/10-Array-Methods/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/10-Array-Methods/README.md b/exercises/10-Array-Methods/README.md index 950a653..0a53c67 100755 --- a/exercises/10-Array-Methods/README.md +++ b/exercises/10-Array-Methods/README.md @@ -12,6 +12,6 @@ tutorial: "https://www.youtube.com/watch?v=jBXve_vh7dU" + Every list comes with default functions that allow sorting - use it inside your function! -+ Stuck on sorting? Read W3 Schools page on sorting lists: ++ Stuck on sorting? Read the W3 Schools page on sorting lists: https://www.w3schools.com/python/ref_list_sort.asp From 3f6d9975200b60bd1d467befc57d07f5baddb79f Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 29 Nov 2023 03:07:23 +0100 Subject: [PATCH 083/123] Update README.md --- exercises/10-Array-Methods/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/10-Array-Methods/README.md b/exercises/10-Array-Methods/README.md index 0a53c67..e91d7f6 100755 --- a/exercises/10-Array-Methods/README.md +++ b/exercises/10-Array-Methods/README.md @@ -10,7 +10,7 @@ tutorial: "https://www.youtube.com/watch?v=jBXve_vh7dU" ## 💡 Hints: -+ Every list comes with default functions that allow sorting - use it inside your function! ++ Every list comes with default functions that allow sorting - use them inside your function! + Stuck on sorting? Read the W3 Schools page on sorting lists: From 8bfd0bc73f4c52fd7272e60a0cb0932bc59eace6 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 29 Nov 2023 03:08:21 +0100 Subject: [PATCH 084/123] Update README.es.md --- exercises/10-Array-Methods/README.es.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/exercises/10-Array-Methods/README.es.md b/exercises/10-Array-Methods/README.es.md index 938c2ad..1c2810b 100644 --- a/exercises/10-Array-Methods/README.es.md +++ b/exercises/10-Array-Methods/README.es.md @@ -1,13 +1,13 @@ -# `10` Métodos de listas +# `10` List Methods ## 📝 Instrucciones: 1. Escribe una función llamada `sort_names` que dada una lista de nombres, los devuelva en orden alfabético. -## 💡 Pista: +## 💡 Pistas: -- Cada lista viene con funciones predeterminadas que permiten ordenarla ¡úsalas dentro de tu función! +- Cada lista viene con funciones predeterminadas que permiten ordenarla, ¡úsalas dentro de tu función! -+ ¿Atrapado en el orden? Lee esta página sobre cómo ordenar listas: ++ ¿Atascado? Lee esta página sobre cómo ordenar listas: -https://www.freecodecamp.org/espanol/news/python-ordenar-lista-con-sort-ascendente-y-descendente-explicado-con-ejemplos/ \ No newline at end of file +https://www.freecodecamp.org/espanol/news/python-ordenar-lista-con-sort-ascendente-y-descendente-explicado-con-ejemplos/ From 4b35a989b4ef58c93b5e89ea59a7e8fe8e02c566 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 29 Nov 2023 03:09:39 +0100 Subject: [PATCH 085/123] Update solution.hide.py --- exercises/10-Array-Methods/solution.hide.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/exercises/10-Array-Methods/solution.hide.py b/exercises/10-Array-Methods/solution.hide.py index f63fbd8..37e6930 100644 --- a/exercises/10-Array-Methods/solution.hide.py +++ b/exercises/10-Array-Methods/solution.hide.py @@ -1,2 +1,8 @@ +names = ['John', 'Kenny', 'Tom', 'Bob', 'Dilan'] + +## CREATE YOUR FUNCTION HERE def sort_names (arr): return sorted(arr) + + +print(sort_names(names)) From 3c028564a1de7425bf2b620f849056ce0d60bf4d Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 29 Nov 2023 03:09:58 +0100 Subject: [PATCH 086/123] Update app.py --- exercises/10-Array-Methods/app.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/exercises/10-Array-Methods/app.py b/exercises/10-Array-Methods/app.py index c88bc18..9d60f6b 100755 --- a/exercises/10-Array-Methods/app.py +++ b/exercises/10-Array-Methods/app.py @@ -1,4 +1,6 @@ names = ['John', 'Kenny', 'Tom', 'Bob', 'Dilan'] + ## CREATE YOUR FUNCTION HERE + print(sort_names(names)) From a229f3077e4236663d6575335f7a54349e036f9b Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 29 Nov 2023 03:12:27 +0100 Subject: [PATCH 087/123] Update README.md --- exercises/10-Array-Methods/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/10-Array-Methods/README.md b/exercises/10-Array-Methods/README.md index e91d7f6..69316e3 100755 --- a/exercises/10-Array-Methods/README.md +++ b/exercises/10-Array-Methods/README.md @@ -14,4 +14,4 @@ tutorial: "https://www.youtube.com/watch?v=jBXve_vh7dU" + Stuck on sorting? Read the W3 Schools page on sorting lists: -https://www.w3schools.com/python/ref_list_sort.asp +https://www.w3schools.com/python/ref_func_sorted.asp From 355a13aeea30635a19c52a1ad7e40609b0a7910a Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 29 Nov 2023 03:13:43 +0100 Subject: [PATCH 088/123] Update tests.py --- exercises/10-Array-Methods/tests.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/exercises/10-Array-Methods/tests.py b/exercises/10-Array-Methods/tests.py index 76a6c4d..5cce1e5 100755 --- a/exercises/10-Array-Methods/tests.py +++ b/exercises/10-Array-Methods/tests.py @@ -1,6 +1,6 @@ import io, sys, pytest, os, re, mock -@pytest.mark.it("Declare the function sort_names") +@pytest.mark.it("Declare the function 'sort_names'") def test_declare_variable(): path = os.path.dirname(os.path.abspath(__file__))+'/app.py' with open(path, 'r') as content_file: @@ -13,7 +13,7 @@ def test_declare_variable(): def test_for_functon_existence(capsys, app): assert callable(app.sort_names) -@pytest.mark.it('The function sort_names must accept 1 parameter and return a sorted one') +@pytest.mark.it('The function sort_names must accept a list and return a sorted one') def test_for_file_output(capsys): import app captured = capsys.readouterr() From b681c43699d487c4100e8e0a01b886a55c7d5d44 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 29 Nov 2023 03:17:33 +0100 Subject: [PATCH 089/123] Update README.md --- exercises/07-lambda-function-two/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/exercises/07-lambda-function-two/README.md b/exercises/07-lambda-function-two/README.md index dcad70e..8796c77 100755 --- a/exercises/07-lambda-function-two/README.md +++ b/exercises/07-lambda-function-two/README.md @@ -9,8 +9,8 @@ tutorial: "https://www.youtube.com/watch?v=1HwmTkQPeMo" Lambda functions allow a short syntax for writing function expressions. ```python -multi = lambda x, y: x * y -print(multi(2,2)) +multiply = lambda x, y: x * y +print(multiply(2,2)) ``` ## 📝 Instructions: From a43808123104b2e57d780570c9f81db70f8c5ff5 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 29 Nov 2023 03:17:44 +0100 Subject: [PATCH 090/123] Update README.es.md --- exercises/07-lambda-function-two/README.es.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/exercises/07-lambda-function-two/README.es.md b/exercises/07-lambda-function-two/README.es.md index 53c054e..c85e631 100644 --- a/exercises/07-lambda-function-two/README.es.md +++ b/exercises/07-lambda-function-two/README.es.md @@ -5,8 +5,8 @@ Las funciones Lambda permiten una sintaxis corta para escribir expresiones de funciones. ```python -multi = lambda x, y: x * y -print(multi(2,2)) +multiply = lambda x, y: x * y +print(multiply(2,2)) ``` ## 📝 Instrucciones: From 30ccbe7ee0d68eaafcbef4008f5dce75a613ae3d Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 13 Dec 2023 19:10:50 +0100 Subject: [PATCH 091/123] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1b224b1..8a28fc2 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ $ npm i learnpack -g && learnpack plugins:install learnpack-python 2) Clone or download this repository. Once you finish downloading, you will find a new folder with a subdirectory called "exercises" that contains all the exercises within. ```bash -$ git clone https://github.com/4GeeksAcademy/python-functions-programming-exercises.git +$ git clone https://github.com/4GeeksAcademy/python-beginner-programming-exercises.git ``` 3) Start the tutorial/exercises by running the following command from the root of the project: From ff4cc7e91fe797136c0239473b17515bd00d4041 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 13 Dec 2023 19:13:00 +0100 Subject: [PATCH 092/123] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8a28fc2..774a396 100644 --- a/README.md +++ b/README.md @@ -43,14 +43,14 @@ $ npm i learnpack -g && learnpack plugins:install learnpack-python 2) Clone or download this repository. Once you finish downloading, you will find a new folder with a subdirectory called "exercises" that contains all the exercises within. ```bash -$ git clone https://github.com/4GeeksAcademy/python-beginner-programming-exercises.git +$ git clone https://github.com/4GeeksAcademy/python-functions-programming-exercises.git ``` 3) Start the tutorial/exercises by running the following command from the root of the project: ```bash $ cd python-functions-programming-exercises -$ pip install pytest==4.4.2 mock pytest-testdox +$ pip3 install pytest==6.2.5 pytest-testdox mock $ learnpack start ``` From 63202b9dda948c17bc5bac97ea9ddf7dab70cb1f Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 13 Dec 2023 19:14:47 +0100 Subject: [PATCH 093/123] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 774a396..bdaa768 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ You can open these exercises in just a few seconds by clicking: [Open in Codespa 1) Make sure you have [LearnPack](https://learnpack.co) installed, node.js version 14+, and Python version 3+. This is the command to install LearnPack: ```bash -$ npm i learnpack -g && learnpack plugins:install learnpack-python +$ npm i -g @learnpack/learnpack@2.1.20 && learnpack plugins:install @learnpack/python@1.0.0 ``` 2) Clone or download this repository. Once you finish downloading, you will find a new folder with a subdirectory called "exercises" that contains all the exercises within. From cc216be849ac02871bc3c7408f50765f4d671199 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 13 Dec 2023 19:18:53 +0100 Subject: [PATCH 094/123] Update README.es.md --- README.es.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.es.md b/README.es.md index 27f2c3e..52f29df 100644 --- a/README.es.md +++ b/README.es.md @@ -34,7 +34,7 @@ Puedes empezar estos ejercicios en pocos segundos haciendo clic en: [Abrir en Co 1) Asegúrate de instalar [LearnPack](https://learnpack.co), node.js version 14+ y Python version 3+. Este es el comando para instalar LearnPack: ```bash -$ npm i learnpack -g && learnpack plugins:install learnpack-python +$ npm i -g @learnpack/learnpack@2.1.20 && learnpack plugins:install @learnpack/python@1.0.0 ``` 2) Clona o descarga este repositorio. Una vez que termines de descargar, encontrarás una carpeta nueva con un subdirectorio llamado "exercises" que contiene los ejercicios. @@ -47,7 +47,7 @@ $ git clone https://github.com/4GeeksAcademy/python-functions-programming-exerci ```bash $ cd python-functions-programming-exercises -$ pip install pytest==4.4.2 mock pytest-testdox +$ pip3 install pytest==6.2.5 pytest-testdox mock $ learnpack start ``` From de8d27b153751a1b2e41ca8badf2618490619807 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 13 Dec 2023 19:20:05 +0100 Subject: [PATCH 095/123] Update README.es.md --- README.es.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.es.md b/README.es.md index 52f29df..e9c0b31 100644 --- a/README.es.md +++ b/README.es.md @@ -67,7 +67,7 @@ Cada ejercicio es un pequeño proyecto en Python que contiene los siguientes arc Gracias a estas personas maravillosas ([emoji key](https://github.com/kentcdodds/all-contributors#emoji-key)): -1. [Alejandro Sanchez (alesanchezr)](https://github.com/alesanchezr), contribución: (programador) 💻, (idea) 🤔, (build-tests) ⚠️, (pull-request-review) 🤓, (build-tutorial) ✅, (documentación) 📖 +1. [Alejandro Sanchez (alesanchezr)](https://github.com/alesanchezr), contribución: (programador) 💻, (idea) 🤔, (build-tests) ⚠️, (pull-request-review) 👀, (build-tutorial) ✅, (documentación) 📖 2. [Paolo (plucodev)](https://github.com/plucodev), contribución: (bug reports) 🐛, (programador) 💻, (traducción) 🌎 From ed10076fe156ee76b95f2223813113a5a731eed9 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 13 Dec 2023 19:36:02 +0100 Subject: [PATCH 096/123] Update README.md --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index bdaa768..b54a2d3 100644 --- a/README.md +++ b/README.md @@ -34,22 +34,22 @@ You can open these exercises in just a few seconds by clicking: [Open in Codespa ## Local Installation -1) Make sure you have [LearnPack](https://learnpack.co) installed, node.js version 14+, and Python version 3+. This is the command to install LearnPack: +1. Make sure you have [LearnPack](https://learnpack.co) installed, node.js version 14+, and Python version 3+. This is the command to install LearnPack: ```bash $ npm i -g @learnpack/learnpack@2.1.20 && learnpack plugins:install @learnpack/python@1.0.0 ``` -2) Clone or download this repository. Once you finish downloading, you will find a new folder with a subdirectory called "exercises" that contains all the exercises within. +2. Clone or download this repository. Once you finish downloading, you will find a new folder with a subdirectory called "exercises" that contains all the exercises within. ```bash $ git clone https://github.com/4GeeksAcademy/python-functions-programming-exercises.git +$ cd python-functions-programming-exercises ``` -3) Start the tutorial/exercises by running the following command from the root of the project: +3. Start the tutorial/exercises by running the following command from the root of the project: ```bash -$ cd python-functions-programming-exercises $ pip3 install pytest==6.2.5 pytest-testdox mock $ learnpack start ``` From b73c98b26ed1f69ffbebf6807252d321be30212d Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 13 Dec 2023 19:37:44 +0100 Subject: [PATCH 097/123] Update README.es.md --- README.es.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.es.md b/README.es.md index e9c0b31..ea7f4dd 100644 --- a/README.es.md +++ b/README.es.md @@ -31,22 +31,22 @@ Puedes empezar estos ejercicios en pocos segundos haciendo clic en: [Abrir en Co ## Instalación local: -1) Asegúrate de instalar [LearnPack](https://learnpack.co), node.js version 14+ y Python version 3+. Este es el comando para instalar LearnPack: +1. Asegúrate de instalar [LearnPack](https://learnpack.co), node.js version 14+ y Python version 3+. Este es el comando para instalar LearnPack: ```bash $ npm i -g @learnpack/learnpack@2.1.20 && learnpack plugins:install @learnpack/python@1.0.0 ``` -2) Clona o descarga este repositorio. Una vez que termines de descargar, encontrarás una carpeta nueva con un subdirectorio llamado "exercises" que contiene los ejercicios. +2. Clona o descarga este repositorio en tu ambiente local. ```bash $ git clone https://github.com/4GeeksAcademy/python-functions-programming-exercises.git +$ cd python-functions-programming-exercises ``` -3) Comienza el tutorial/ejercicios ejecutando el siguiente comando en la raíz del proyecto: +3. Comienza el tutorial/ejercicios ejecutando el siguiente comando en la raíz del proyecto: ```bash -$ cd python-functions-programming-exercises $ pip3 install pytest==6.2.5 pytest-testdox mock $ learnpack start ``` From bb9e11d189c43f4d5e19e890b279bb979d8ab793 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 13 Dec 2023 19:38:15 +0100 Subject: [PATCH 098/123] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b54a2d3..424713c 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ You can open these exercises in just a few seconds by clicking: [Open in Codespa $ npm i -g @learnpack/learnpack@2.1.20 && learnpack plugins:install @learnpack/python@1.0.0 ``` -2. Clone or download this repository. Once you finish downloading, you will find a new folder with a subdirectory called "exercises" that contains all the exercises within. +2. Clone or download this repository in your local environment. ```bash $ git clone https://github.com/4GeeksAcademy/python-functions-programming-exercises.git From 9084eee8acba1c7e523eaa03b29948a3ec790aa2 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 13 Dec 2023 19:43:21 +0100 Subject: [PATCH 099/123] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 424713c..c52205e 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,7 @@ $ learnpack start ## How are the exercises organized? -Each exercise is a small React application containing the following files: +Each exercise is a small Python application containing the following files: 1. **app.py:** represents the entry Python file that will be executed by the computer. 2. **README.md:** contains exercise instructions. From fd801fd84e945aa896ce66564f9eb24315e45428 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 13 Dec 2023 19:55:37 +0100 Subject: [PATCH 100/123] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index c52205e..18994a9 100644 --- a/README.md +++ b/README.md @@ -47,6 +47,8 @@ $ git clone https://github.com/4GeeksAcademy/python-functions-programming-exerci $ cd python-functions-programming-exercises ``` +> Note: Once you finish downloading, you will find an "exercises" folder that contains all the exercises within. + 3. Start the tutorial/exercises by running the following command from the root of the project: ```bash From e2ac839c33e1ec091e5a2db51bf13f0a48d3616e Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 13 Dec 2023 19:56:01 +0100 Subject: [PATCH 101/123] Update README.es.md --- README.es.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.es.md b/README.es.md index ea7f4dd..70a7973 100644 --- a/README.es.md +++ b/README.es.md @@ -44,6 +44,8 @@ $ git clone https://github.com/4GeeksAcademy/python-functions-programming-exerci $ cd python-functions-programming-exercises ``` +> Nota: Una vez que termine de descargar, encontrarás la carpeta "exercises" que contiene todos los ejercicios. + 3. Comienza el tutorial/ejercicios ejecutando el siguiente comando en la raíz del proyecto: ```bash From f17dff4b755a198213fe2ce57fc577340ef55202 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 20 Dec 2023 18:18:23 +0000 Subject: [PATCH 102/123] cambio de numeros a todo para poner el 00-welcome --- exercises/{01-hello-world => 00-Welcome}/README.es.md | 0 exercises/{01-hello-world => 00-Welcome}/README.md | 0 exercises/{02-Hello-World => 01-Hello-World}/README.es.md | 2 +- exercises/{02-Hello-World => 01-Hello-World}/README.md | 2 +- exercises/{02-Hello-World => 01-Hello-World}/app.py | 0 exercises/{02-Hello-World => 01-Hello-World}/solution.hide.py | 0 exercises/{02-Hello-World => 01-Hello-World}/test.py | 0 .../README.es.md | 2 +- .../{03-What-is-a-function => 02-What-is-a-function}/README.md | 2 +- .../{03-What-is-a-function => 02-What-is-a-function}/app.py | 0 .../solution.hide.py | 0 .../{03-What-is-a-function => 02-What-is-a-function}/tests.py | 0 .../{04-Call-a-function => 03-Call-a-function}/README.es.md | 2 +- exercises/{04-Call-a-function => 03-Call-a-function}/README.md | 2 +- exercises/{04-Call-a-function => 03-Call-a-function}/app.py | 0 .../{04-Call-a-function => 03-Call-a-function}/solution.hide.py | 0 exercises/{04-Call-a-function => 03-Call-a-function}/tests.py | 0 .../README.es.md | 2 +- .../README.md | 2 +- .../app.py | 0 .../solution.hide.py | 0 .../tests.py | 0 .../{06-lambda-functions => 05-lambda-functions}/README.es.md | 2 +- .../{06-lambda-functions => 05-lambda-functions}/README.md | 2 +- exercises/{06-lambda-functions => 05-lambda-functions}/app.py | 0 .../solution.hide.py | 0 exercises/{06-lambda-functions => 05-lambda-functions}/tests.py | 0 .../README.es.md | 2 +- .../README.md | 2 +- .../{07-lambda-function-two => 06-lambda-function-two}/app.py | 0 .../solution.hide.py | 0 .../{07-lambda-function-two => 06-lambda-function-two}/tests.py | 0 .../README.es.md | 2 +- .../README.md | 2 +- .../app.py | 0 .../solution.hide.py | 0 .../test.py | 0 .../README.es.md | 2 +- .../README.md | 2 +- .../{09-Function-parameters => 08-Function-parameters}/app.py | 0 .../solution.hide.py | 0 .../{09-Function-parameters => 08-Function-parameters}/tests.py | 0 exercises/{10-Array-Methods => 09-Array-Methods}/README.es.md | 2 +- exercises/{10-Array-Methods => 09-Array-Methods}/README.md | 2 +- exercises/{10-Array-Methods => 09-Array-Methods}/app.py | 0 .../{10-Array-Methods => 09-Array-Methods}/solution.hide.py | 0 exercises/{10-Array-Methods => 09-Array-Methods}/tests.py | 0 47 files changed, 18 insertions(+), 18 deletions(-) rename exercises/{01-hello-world => 00-Welcome}/README.es.md (100%) rename exercises/{01-hello-world => 00-Welcome}/README.md (100%) rename exercises/{02-Hello-World => 01-Hello-World}/README.es.md (97%) rename exercises/{02-Hello-World => 01-Hello-World}/README.md (97%) rename exercises/{02-Hello-World => 01-Hello-World}/app.py (100%) rename exercises/{02-Hello-World => 01-Hello-World}/solution.hide.py (100%) rename exercises/{02-Hello-World => 01-Hello-World}/test.py (100%) rename exercises/{03-What-is-a-function => 02-What-is-a-function}/README.es.md (96%) rename exercises/{03-What-is-a-function => 02-What-is-a-function}/README.md (96%) rename exercises/{03-What-is-a-function => 02-What-is-a-function}/app.py (100%) rename exercises/{03-What-is-a-function => 02-What-is-a-function}/solution.hide.py (100%) rename exercises/{03-What-is-a-function => 02-What-is-a-function}/tests.py (100%) rename exercises/{04-Call-a-function => 03-Call-a-function}/README.es.md (98%) rename exercises/{04-Call-a-function => 03-Call-a-function}/README.md (97%) rename exercises/{04-Call-a-function => 03-Call-a-function}/app.py (100%) rename exercises/{04-Call-a-function => 03-Call-a-function}/solution.hide.py (100%) rename exercises/{04-Call-a-function => 03-Call-a-function}/tests.py (100%) rename exercises/{05-Defining-vs-Calling-a-function => 04-Defining-vs-Calling-a-function}/README.es.md (98%) rename exercises/{05-Defining-vs-Calling-a-function => 04-Defining-vs-Calling-a-function}/README.md (98%) rename exercises/{05-Defining-vs-Calling-a-function => 04-Defining-vs-Calling-a-function}/app.py (100%) rename exercises/{05-Defining-vs-Calling-a-function => 04-Defining-vs-Calling-a-function}/solution.hide.py (100%) rename exercises/{05-Defining-vs-Calling-a-function => 04-Defining-vs-Calling-a-function}/tests.py (100%) rename exercises/{06-lambda-functions => 05-lambda-functions}/README.es.md (97%) rename exercises/{06-lambda-functions => 05-lambda-functions}/README.md (97%) rename exercises/{06-lambda-functions => 05-lambda-functions}/app.py (100%) rename exercises/{06-lambda-functions => 05-lambda-functions}/solution.hide.py (100%) rename exercises/{06-lambda-functions => 05-lambda-functions}/tests.py (100%) rename exercises/{07-lambda-function-two => 06-lambda-function-two}/README.es.md (95%) rename exercises/{07-lambda-function-two => 06-lambda-function-two}/README.md (95%) rename exercises/{07-lambda-function-two => 06-lambda-function-two}/app.py (100%) rename exercises/{07-lambda-function-two => 06-lambda-function-two}/solution.hide.py (100%) rename exercises/{07-lambda-function-two => 06-lambda-function-two}/tests.py (100%) rename exercises/{08-Function-that-returns => 07-Function-that-returns}/README.es.md (96%) rename exercises/{08-Function-that-returns => 07-Function-that-returns}/README.md (96%) rename exercises/{08-Function-that-returns => 07-Function-that-returns}/app.py (100%) rename exercises/{08-Function-that-returns => 07-Function-that-returns}/solution.hide.py (100%) rename exercises/{08-Function-that-returns => 07-Function-that-returns}/test.py (100%) rename exercises/{09-Function-parameters => 08-Function-parameters}/README.es.md (96%) rename exercises/{09-Function-parameters => 08-Function-parameters}/README.md (96%) rename exercises/{09-Function-parameters => 08-Function-parameters}/app.py (100%) rename exercises/{09-Function-parameters => 08-Function-parameters}/solution.hide.py (100%) rename exercises/{09-Function-parameters => 08-Function-parameters}/tests.py (100%) rename exercises/{10-Array-Methods => 09-Array-Methods}/README.es.md (95%) rename exercises/{10-Array-Methods => 09-Array-Methods}/README.md (95%) rename exercises/{10-Array-Methods => 09-Array-Methods}/app.py (100%) rename exercises/{10-Array-Methods => 09-Array-Methods}/solution.hide.py (100%) rename exercises/{10-Array-Methods => 09-Array-Methods}/tests.py (100%) diff --git a/exercises/01-hello-world/README.es.md b/exercises/00-Welcome/README.es.md similarity index 100% rename from exercises/01-hello-world/README.es.md rename to exercises/00-Welcome/README.es.md diff --git a/exercises/01-hello-world/README.md b/exercises/00-Welcome/README.md similarity index 100% rename from exercises/01-hello-world/README.md rename to exercises/00-Welcome/README.md diff --git a/exercises/02-Hello-World/README.es.md b/exercises/01-Hello-World/README.es.md similarity index 97% rename from exercises/02-Hello-World/README.es.md rename to exercises/01-Hello-World/README.es.md index 2ebad83..da0ecf5 100644 --- a/exercises/02-Hello-World/README.es.md +++ b/exercises/01-Hello-World/README.es.md @@ -1,4 +1,4 @@ -# `02` Hello World +# `01` Hello World En Python, usamos **print** para hacer que el computador escriba cualquier cosa que queramos (el contenido de una variable, un string dado, etc.) en algo llamado "la consola". diff --git a/exercises/02-Hello-World/README.md b/exercises/01-Hello-World/README.md similarity index 97% rename from exercises/02-Hello-World/README.md rename to exercises/01-Hello-World/README.md index 25b59bc..cd5ba73 100644 --- a/exercises/02-Hello-World/README.md +++ b/exercises/01-Hello-World/README.md @@ -2,7 +2,7 @@ tutorial: "https://www.youtube.com/watch?v=voBO7a0KPtE" --- -# `02` Hello World +# `01` Hello World In Python, we use **print** to make the computer write anything we want (the content of a variable, a given string, etc.) in something called "the console". diff --git a/exercises/02-Hello-World/app.py b/exercises/01-Hello-World/app.py similarity index 100% rename from exercises/02-Hello-World/app.py rename to exercises/01-Hello-World/app.py diff --git a/exercises/02-Hello-World/solution.hide.py b/exercises/01-Hello-World/solution.hide.py similarity index 100% rename from exercises/02-Hello-World/solution.hide.py rename to exercises/01-Hello-World/solution.hide.py diff --git a/exercises/02-Hello-World/test.py b/exercises/01-Hello-World/test.py similarity index 100% rename from exercises/02-Hello-World/test.py rename to exercises/01-Hello-World/test.py diff --git a/exercises/03-What-is-a-function/README.es.md b/exercises/02-What-is-a-function/README.es.md similarity index 96% rename from exercises/03-What-is-a-function/README.es.md rename to exercises/02-What-is-a-function/README.es.md index e1de4ff..bf34887 100644 --- a/exercises/03-What-is-a-function/README.es.md +++ b/exercises/02-What-is-a-function/README.es.md @@ -1,4 +1,4 @@ -# `03` What is a function? +# `02` What is a function? Puedes ver una función como un **fragmento de código** que puedes usar varias veces. diff --git a/exercises/03-What-is-a-function/README.md b/exercises/02-What-is-a-function/README.md similarity index 96% rename from exercises/03-What-is-a-function/README.md rename to exercises/02-What-is-a-function/README.md index 4f00844..5bd1324 100755 --- a/exercises/03-What-is-a-function/README.md +++ b/exercises/02-What-is-a-function/README.md @@ -2,7 +2,7 @@ tutorial: "https://www.youtube.com/watch?v=tgTLyZ0cKj4" --- -# `03` What is a function? +# `02` What is a function? You can see a function as a **fragment of code** we can use several times. diff --git a/exercises/03-What-is-a-function/app.py b/exercises/02-What-is-a-function/app.py similarity index 100% rename from exercises/03-What-is-a-function/app.py rename to exercises/02-What-is-a-function/app.py diff --git a/exercises/03-What-is-a-function/solution.hide.py b/exercises/02-What-is-a-function/solution.hide.py similarity index 100% rename from exercises/03-What-is-a-function/solution.hide.py rename to exercises/02-What-is-a-function/solution.hide.py diff --git a/exercises/03-What-is-a-function/tests.py b/exercises/02-What-is-a-function/tests.py similarity index 100% rename from exercises/03-What-is-a-function/tests.py rename to exercises/02-What-is-a-function/tests.py diff --git a/exercises/04-Call-a-function/README.es.md b/exercises/03-Call-a-function/README.es.md similarity index 98% rename from exercises/04-Call-a-function/README.es.md rename to exercises/03-Call-a-function/README.es.md index ae2c760..a81e346 100644 --- a/exercises/04-Call-a-function/README.es.md +++ b/exercises/03-Call-a-function/README.es.md @@ -1,7 +1,7 @@ --- tutorial: "https://www.youtube.com/watch?v=NU5iW_bWwmY" --- -# `04` Calling a Function +# `03` Calling a Function Una función podría recibir 0 parámetros y devolverá algo siempre, incluso si no añades explícitamente el `return`. diff --git a/exercises/04-Call-a-function/README.md b/exercises/03-Call-a-function/README.md similarity index 97% rename from exercises/04-Call-a-function/README.md rename to exercises/03-Call-a-function/README.md index 58e957f..7e1d9f5 100755 --- a/exercises/04-Call-a-function/README.md +++ b/exercises/03-Call-a-function/README.md @@ -2,7 +2,7 @@ tutorial: "https://www.youtube.com/watch?v=NU5iW_bWwmY" --- -# `04` Calling a Function +# `03` Calling a Function A function could receive zero parameters, and it always returns something, even if you don't explicitly add the `return` statement. diff --git a/exercises/04-Call-a-function/app.py b/exercises/03-Call-a-function/app.py similarity index 100% rename from exercises/04-Call-a-function/app.py rename to exercises/03-Call-a-function/app.py diff --git a/exercises/04-Call-a-function/solution.hide.py b/exercises/03-Call-a-function/solution.hide.py similarity index 100% rename from exercises/04-Call-a-function/solution.hide.py rename to exercises/03-Call-a-function/solution.hide.py diff --git a/exercises/04-Call-a-function/tests.py b/exercises/03-Call-a-function/tests.py similarity index 100% rename from exercises/04-Call-a-function/tests.py rename to exercises/03-Call-a-function/tests.py diff --git a/exercises/05-Defining-vs-Calling-a-function/README.es.md b/exercises/04-Defining-vs-Calling-a-function/README.es.md similarity index 98% rename from exercises/05-Defining-vs-Calling-a-function/README.es.md rename to exercises/04-Defining-vs-Calling-a-function/README.es.md index 0df4059..2095bcf 100644 --- a/exercises/05-Defining-vs-Calling-a-function/README.es.md +++ b/exercises/04-Defining-vs-Calling-a-function/README.es.md @@ -1,4 +1,4 @@ -# `05` Defining vs Calling a Function +# `04` Defining vs Calling a Function Las funciones solo existen si tú u otra persona las define... es la única forma en que el compilador/intérprete de lenguaje sabe que existen, por lo tanto, puede ejecutarlas cuando las llamas. diff --git a/exercises/05-Defining-vs-Calling-a-function/README.md b/exercises/04-Defining-vs-Calling-a-function/README.md similarity index 98% rename from exercises/05-Defining-vs-Calling-a-function/README.md rename to exercises/04-Defining-vs-Calling-a-function/README.md index 4d059b5..11b4567 100755 --- a/exercises/05-Defining-vs-Calling-a-function/README.md +++ b/exercises/04-Defining-vs-Calling-a-function/README.md @@ -2,7 +2,7 @@ tutorial: "https://www.youtube.com/watch?v=fz4ttmwZWuc" --- -# `05` Defining vs Calling a Function +# `04` Defining vs Calling a Function Functions will only exist if you or somebody else defines them; it is the only way the language compiler/interpreter knows they exist, therefore it's able to run them when you call them. diff --git a/exercises/05-Defining-vs-Calling-a-function/app.py b/exercises/04-Defining-vs-Calling-a-function/app.py similarity index 100% rename from exercises/05-Defining-vs-Calling-a-function/app.py rename to exercises/04-Defining-vs-Calling-a-function/app.py diff --git a/exercises/05-Defining-vs-Calling-a-function/solution.hide.py b/exercises/04-Defining-vs-Calling-a-function/solution.hide.py similarity index 100% rename from exercises/05-Defining-vs-Calling-a-function/solution.hide.py rename to exercises/04-Defining-vs-Calling-a-function/solution.hide.py diff --git a/exercises/05-Defining-vs-Calling-a-function/tests.py b/exercises/04-Defining-vs-Calling-a-function/tests.py similarity index 100% rename from exercises/05-Defining-vs-Calling-a-function/tests.py rename to exercises/04-Defining-vs-Calling-a-function/tests.py diff --git a/exercises/06-lambda-functions/README.es.md b/exercises/05-lambda-functions/README.es.md similarity index 97% rename from exercises/06-lambda-functions/README.es.md rename to exercises/05-lambda-functions/README.es.md index 40dcd34..9db503e 100644 --- a/exercises/06-lambda-functions/README.es.md +++ b/exercises/05-lambda-functions/README.es.md @@ -1,4 +1,4 @@ -# `06` Lambda Functions in Python +# `05` Lambda Functions in Python Una **función lambda** es una función con solo una línea de código y sin nombre. diff --git a/exercises/06-lambda-functions/README.md b/exercises/05-lambda-functions/README.md similarity index 97% rename from exercises/06-lambda-functions/README.md rename to exercises/05-lambda-functions/README.md index 771ef04..fbd20e8 100755 --- a/exercises/06-lambda-functions/README.md +++ b/exercises/05-lambda-functions/README.md @@ -3,7 +3,7 @@ tutorial: "https://www.youtube.com/watch?v=HACQ9uerCuE" --- -# `06` Lambda Functions in Python +# `05` Lambda Functions in Python A **lambda function** is a function with just one line of code and no name. diff --git a/exercises/06-lambda-functions/app.py b/exercises/05-lambda-functions/app.py similarity index 100% rename from exercises/06-lambda-functions/app.py rename to exercises/05-lambda-functions/app.py diff --git a/exercises/06-lambda-functions/solution.hide.py b/exercises/05-lambda-functions/solution.hide.py similarity index 100% rename from exercises/06-lambda-functions/solution.hide.py rename to exercises/05-lambda-functions/solution.hide.py diff --git a/exercises/06-lambda-functions/tests.py b/exercises/05-lambda-functions/tests.py similarity index 100% rename from exercises/06-lambda-functions/tests.py rename to exercises/05-lambda-functions/tests.py diff --git a/exercises/07-lambda-function-two/README.es.md b/exercises/06-lambda-function-two/README.es.md similarity index 95% rename from exercises/07-lambda-function-two/README.es.md rename to exercises/06-lambda-function-two/README.es.md index c85e631..f1b61f9 100644 --- a/exercises/07-lambda-function-two/README.es.md +++ b/exercises/06-lambda-function-two/README.es.md @@ -1,4 +1,4 @@ -# `07` Lambda Functions +# `06` Lambda Functions ### ☝ Recuerda: diff --git a/exercises/07-lambda-function-two/README.md b/exercises/06-lambda-function-two/README.md similarity index 95% rename from exercises/07-lambda-function-two/README.md rename to exercises/06-lambda-function-two/README.md index 8796c77..45e54a9 100755 --- a/exercises/07-lambda-function-two/README.md +++ b/exercises/06-lambda-function-two/README.md @@ -2,7 +2,7 @@ tutorial: "https://www.youtube.com/watch?v=1HwmTkQPeMo" --- -# `07` Lambda Functions +# `06` Lambda Functions ### ☝ Remember: diff --git a/exercises/07-lambda-function-two/app.py b/exercises/06-lambda-function-two/app.py similarity index 100% rename from exercises/07-lambda-function-two/app.py rename to exercises/06-lambda-function-two/app.py diff --git a/exercises/07-lambda-function-two/solution.hide.py b/exercises/06-lambda-function-two/solution.hide.py similarity index 100% rename from exercises/07-lambda-function-two/solution.hide.py rename to exercises/06-lambda-function-two/solution.hide.py diff --git a/exercises/07-lambda-function-two/tests.py b/exercises/06-lambda-function-two/tests.py similarity index 100% rename from exercises/07-lambda-function-two/tests.py rename to exercises/06-lambda-function-two/tests.py diff --git a/exercises/08-Function-that-returns/README.es.md b/exercises/07-Function-that-returns/README.es.md similarity index 96% rename from exercises/08-Function-that-returns/README.es.md rename to exercises/07-Function-that-returns/README.es.md index add2e88..086c4eb 100644 --- a/exercises/08-Function-that-returns/README.es.md +++ b/exercises/07-Function-that-returns/README.es.md @@ -1,4 +1,4 @@ -# `08` Functions that return +# `07` Functions that return Es una muy buena práctica que las funciones devuelvan algo, incluso si es `None`. diff --git a/exercises/08-Function-that-returns/README.md b/exercises/07-Function-that-returns/README.md similarity index 96% rename from exercises/08-Function-that-returns/README.md rename to exercises/07-Function-that-returns/README.md index 1f4a6d7..01d7d9c 100755 --- a/exercises/08-Function-that-returns/README.md +++ b/exercises/07-Function-that-returns/README.md @@ -2,7 +2,7 @@ tutorial: "https://www.youtube.com/watch?v=-tqNmngh1PE" --- -# `08` Functions that return +# `07` Functions that return It is very good practice that all functions return something, even if it is `None`. diff --git a/exercises/08-Function-that-returns/app.py b/exercises/07-Function-that-returns/app.py similarity index 100% rename from exercises/08-Function-that-returns/app.py rename to exercises/07-Function-that-returns/app.py diff --git a/exercises/08-Function-that-returns/solution.hide.py b/exercises/07-Function-that-returns/solution.hide.py similarity index 100% rename from exercises/08-Function-that-returns/solution.hide.py rename to exercises/07-Function-that-returns/solution.hide.py diff --git a/exercises/08-Function-that-returns/test.py b/exercises/07-Function-that-returns/test.py similarity index 100% rename from exercises/08-Function-that-returns/test.py rename to exercises/07-Function-that-returns/test.py diff --git a/exercises/09-Function-parameters/README.es.md b/exercises/08-Function-parameters/README.es.md similarity index 96% rename from exercises/09-Function-parameters/README.es.md rename to exercises/08-Function-parameters/README.es.md index ca03d09..1f81497 100644 --- a/exercises/09-Function-parameters/README.es.md +++ b/exercises/08-Function-parameters/README.es.md @@ -1,4 +1,4 @@ -# `09` Function parameters +# `08` Function parameters Puedes especificar tantos parámetros como desees en una función. diff --git a/exercises/09-Function-parameters/README.md b/exercises/08-Function-parameters/README.md similarity index 96% rename from exercises/09-Function-parameters/README.md rename to exercises/08-Function-parameters/README.md index d8a4321..6ad2d14 100755 --- a/exercises/09-Function-parameters/README.md +++ b/exercises/08-Function-parameters/README.md @@ -2,7 +2,7 @@ tutorial: "https://www.youtube.com/watch?v=uaiDxW4LJNA" --- -# `09` Function parameters +# `08` Function parameters You can specify as many parameters as you want in a function. diff --git a/exercises/09-Function-parameters/app.py b/exercises/08-Function-parameters/app.py similarity index 100% rename from exercises/09-Function-parameters/app.py rename to exercises/08-Function-parameters/app.py diff --git a/exercises/09-Function-parameters/solution.hide.py b/exercises/08-Function-parameters/solution.hide.py similarity index 100% rename from exercises/09-Function-parameters/solution.hide.py rename to exercises/08-Function-parameters/solution.hide.py diff --git a/exercises/09-Function-parameters/tests.py b/exercises/08-Function-parameters/tests.py similarity index 100% rename from exercises/09-Function-parameters/tests.py rename to exercises/08-Function-parameters/tests.py diff --git a/exercises/10-Array-Methods/README.es.md b/exercises/09-Array-Methods/README.es.md similarity index 95% rename from exercises/10-Array-Methods/README.es.md rename to exercises/09-Array-Methods/README.es.md index 1c2810b..033cec3 100644 --- a/exercises/10-Array-Methods/README.es.md +++ b/exercises/09-Array-Methods/README.es.md @@ -1,4 +1,4 @@ -# `10` List Methods +# `09` List Methods ## 📝 Instrucciones: diff --git a/exercises/10-Array-Methods/README.md b/exercises/09-Array-Methods/README.md similarity index 95% rename from exercises/10-Array-Methods/README.md rename to exercises/09-Array-Methods/README.md index 69316e3..c3568b0 100755 --- a/exercises/10-Array-Methods/README.md +++ b/exercises/09-Array-Methods/README.md @@ -2,7 +2,7 @@ tutorial: "https://www.youtube.com/watch?v=jBXve_vh7dU" --- -# `10` List Methods +# `09` List Methods ## 📝 Instructions: diff --git a/exercises/10-Array-Methods/app.py b/exercises/09-Array-Methods/app.py similarity index 100% rename from exercises/10-Array-Methods/app.py rename to exercises/09-Array-Methods/app.py diff --git a/exercises/10-Array-Methods/solution.hide.py b/exercises/09-Array-Methods/solution.hide.py similarity index 100% rename from exercises/10-Array-Methods/solution.hide.py rename to exercises/09-Array-Methods/solution.hide.py diff --git a/exercises/10-Array-Methods/tests.py b/exercises/09-Array-Methods/tests.py similarity index 100% rename from exercises/10-Array-Methods/tests.py rename to exercises/09-Array-Methods/tests.py From 3f0fa1e06f39cd81df41829f5c1b1883fc1bcdc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charly=20Chac=C3=B3n?= <107764250+Charlytoc@users.noreply.github.com> Date: Tue, 27 Feb 2024 16:23:32 -0500 Subject: [PATCH 103/123] Update devcontainer.json --- .devcontainer/devcontainer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 3c87dfd..8c084e4 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -21,7 +21,7 @@ "extensions": ["learn-pack.learnpack-vscode"] } }, - "onCreateCommand": "pip3 install pytest==6.2.5 pytest-testdox mock && npm i @learnpack/learnpack@2.1.20 -g && learnpack plugins:install @learnpack/python@1.0.0" + "onCreateCommand": "pip3 install pytest==6.2.5 pytest-testdox mock && npm i @learnpack/learnpack@2.1.35 -g && learnpack plugins:install @learnpack/python@1.0.0" // Features to add to the dev container. More info: https://containers.dev/features. // "features": {}, From 54198176b298d1ee9e82c25a8a0bfbf9fdb9a633 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charly=20Chac=C3=B3n?= <107764250+Charlytoc@users.noreply.github.com> Date: Tue, 27 Feb 2024 16:24:45 -0500 Subject: [PATCH 104/123] Update learn.json --- learn.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/learn.json b/learn.json index 4786842..130bb24 100644 --- a/learn.json +++ b/learn.json @@ -19,7 +19,7 @@ "graded": true, "editor": { - "version": "1.0.73" + "version": "3.1.9" } } From dfaa8efeb4b37c4db25d47dd2a02cd078df4f872 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charly=20Chac=C3=B3n?= <107764250+Charlytoc@users.noreply.github.com> Date: Wed, 13 Mar 2024 02:15:05 +0000 Subject: [PATCH 105/123] ADding videos --- exercises/00-Welcome/README.es.md | 3 +++ exercises/00-Welcome/README.md | 2 +- exercises/01-Hello-World/README.es.md | 4 ++++ exercises/01-Hello-World/README.md | 2 +- exercises/02-What-is-a-function/README.es.md | 3 +++ exercises/02-What-is-a-function/README.md | 2 +- exercises/03-Call-a-function/README.es.md | 2 +- exercises/03-Call-a-function/README.md | 2 +- exercises/04-Defining-vs-Calling-a-function/README.es.md | 4 ++++ exercises/04-Defining-vs-Calling-a-function/README.md | 2 +- exercises/05-lambda-functions/README.es.md | 4 ++++ exercises/05-lambda-functions/README.md | 2 +- exercises/06-lambda-function-two/README.es.md | 4 ++++ exercises/06-lambda-function-two/README.md | 2 +- exercises/07-Function-that-returns/README.es.md | 4 ++++ exercises/07-Function-that-returns/README.md | 2 +- exercises/08-Function-parameters/README.es.md | 4 ++++ exercises/08-Function-parameters/README.md | 2 +- exercises/09-Array-Methods/README.es.md | 4 ++++ exercises/09-Array-Methods/README.md | 2 +- 20 files changed, 45 insertions(+), 11 deletions(-) diff --git a/exercises/00-Welcome/README.es.md b/exercises/00-Welcome/README.es.md index 82f48a5..a2964b0 100644 --- a/exercises/00-Welcome/README.es.md +++ b/exercises/00-Welcome/README.es.md @@ -1,3 +1,6 @@ +--- +intro: "https://www.youtube.com/watch?v=SD9lqR67yMY" +--- # Welcome to Python Functions! ¡¡Nos entusiasma mucho tenerte aquí!! 🎉 😂 diff --git a/exercises/00-Welcome/README.md b/exercises/00-Welcome/README.md index 5522b4b..4b14bc8 100644 --- a/exercises/00-Welcome/README.md +++ b/exercises/00-Welcome/README.md @@ -1,5 +1,5 @@ --- -intro: "https://www.youtube.com/watch?v=awa_yfGgy9s" +intro: "https://www.youtube.com/watch?v=06rxSj-9wM4" --- # Welcome to Python Functions! diff --git a/exercises/01-Hello-World/README.es.md b/exercises/01-Hello-World/README.es.md index da0ecf5..bafbb75 100644 --- a/exercises/01-Hello-World/README.es.md +++ b/exercises/01-Hello-World/README.es.md @@ -1,3 +1,7 @@ +--- +tutorial: "https://www.youtube.com/watch?v=X1XZ4d-DE4Q" +--- + # `01` Hello World En Python, usamos **print** para hacer que el computador escriba cualquier cosa que queramos (el contenido de una variable, un string dado, etc.) en algo llamado "la consola". diff --git a/exercises/01-Hello-World/README.md b/exercises/01-Hello-World/README.md index cd5ba73..943c535 100644 --- a/exercises/01-Hello-World/README.md +++ b/exercises/01-Hello-World/README.md @@ -1,5 +1,5 @@ --- -tutorial: "https://www.youtube.com/watch?v=voBO7a0KPtE" +tutorial: "https://www.youtube.com/watch?v=_0zvPIS587w" --- # `01` Hello World diff --git a/exercises/02-What-is-a-function/README.es.md b/exercises/02-What-is-a-function/README.es.md index bf34887..6fe4214 100644 --- a/exercises/02-What-is-a-function/README.es.md +++ b/exercises/02-What-is-a-function/README.es.md @@ -1,3 +1,6 @@ +--- +tutorial: "https://www.youtube.com/watch?v=4JzHH2qR8n0" +--- # `02` What is a function? Puedes ver una función como un **fragmento de código** que puedes usar varias veces. diff --git a/exercises/02-What-is-a-function/README.md b/exercises/02-What-is-a-function/README.md index 5bd1324..24569d2 100755 --- a/exercises/02-What-is-a-function/README.md +++ b/exercises/02-What-is-a-function/README.md @@ -1,5 +1,5 @@ --- -tutorial: "https://www.youtube.com/watch?v=tgTLyZ0cKj4" +tutorial: "https://www.youtube.com/watch?v=U5GId8yOc-A" --- # `02` What is a function? diff --git a/exercises/03-Call-a-function/README.es.md b/exercises/03-Call-a-function/README.es.md index a81e346..8748075 100644 --- a/exercises/03-Call-a-function/README.es.md +++ b/exercises/03-Call-a-function/README.es.md @@ -1,5 +1,5 @@ --- -tutorial: "https://www.youtube.com/watch?v=NU5iW_bWwmY" +tutorial: "https://www.youtube.com/watch?v=F7_I8PD38ZQ" --- # `03` Calling a Function diff --git a/exercises/03-Call-a-function/README.md b/exercises/03-Call-a-function/README.md index 7e1d9f5..07ce82d 100755 --- a/exercises/03-Call-a-function/README.md +++ b/exercises/03-Call-a-function/README.md @@ -1,5 +1,5 @@ --- -tutorial: "https://www.youtube.com/watch?v=NU5iW_bWwmY" +tutorial: "https://www.youtube.com/watch?v=8tvkCp3EMiM" --- # `03` Calling a Function diff --git a/exercises/04-Defining-vs-Calling-a-function/README.es.md b/exercises/04-Defining-vs-Calling-a-function/README.es.md index 2095bcf..9f2d53f 100644 --- a/exercises/04-Defining-vs-Calling-a-function/README.es.md +++ b/exercises/04-Defining-vs-Calling-a-function/README.es.md @@ -1,3 +1,7 @@ +--- +tutorial: "https://www.youtube.com/watch?v=ztyFrIY7U3o" +--- + # `04` Defining vs Calling a Function Las funciones solo existen si tú u otra persona las define... es la única forma en que el compilador/intérprete de lenguaje sabe que existen, por lo tanto, puede ejecutarlas cuando las llamas. diff --git a/exercises/04-Defining-vs-Calling-a-function/README.md b/exercises/04-Defining-vs-Calling-a-function/README.md index 11b4567..ea048df 100755 --- a/exercises/04-Defining-vs-Calling-a-function/README.md +++ b/exercises/04-Defining-vs-Calling-a-function/README.md @@ -1,5 +1,5 @@ --- -tutorial: "https://www.youtube.com/watch?v=fz4ttmwZWuc" +tutorial: "https://www.youtube.com/watch?v=XbDE19gR678" --- # `04` Defining vs Calling a Function diff --git a/exercises/05-lambda-functions/README.es.md b/exercises/05-lambda-functions/README.es.md index 9db503e..8298707 100644 --- a/exercises/05-lambda-functions/README.es.md +++ b/exercises/05-lambda-functions/README.es.md @@ -1,3 +1,7 @@ +--- +tutorial: "https://www.youtube.com/watch?v=UH__beyfTlo" +--- + # `05` Lambda Functions in Python Una **función lambda** es una función con solo una línea de código y sin nombre. diff --git a/exercises/05-lambda-functions/README.md b/exercises/05-lambda-functions/README.md index fbd20e8..6ce4581 100755 --- a/exercises/05-lambda-functions/README.md +++ b/exercises/05-lambda-functions/README.md @@ -1,5 +1,5 @@ --- -tutorial: "https://www.youtube.com/watch?v=HACQ9uerCuE" +tutorial: "https://www.youtube.com/watch?v=vRusUCDa3-k" --- diff --git a/exercises/06-lambda-function-two/README.es.md b/exercises/06-lambda-function-two/README.es.md index f1b61f9..fc990cb 100644 --- a/exercises/06-lambda-function-two/README.es.md +++ b/exercises/06-lambda-function-two/README.es.md @@ -1,3 +1,7 @@ +--- +tutorial: "https://www.youtube.com/watch?v=F30Vkf69SHI" +--- + # `06` Lambda Functions ### ☝ Recuerda: diff --git a/exercises/06-lambda-function-two/README.md b/exercises/06-lambda-function-two/README.md index 45e54a9..c293196 100755 --- a/exercises/06-lambda-function-two/README.md +++ b/exercises/06-lambda-function-two/README.md @@ -1,5 +1,5 @@ --- -tutorial: "https://www.youtube.com/watch?v=1HwmTkQPeMo" +tutorial: "https://www.youtube.com/watch?v=0KX8Bh7d_9E" --- # `06` Lambda Functions diff --git a/exercises/07-Function-that-returns/README.es.md b/exercises/07-Function-that-returns/README.es.md index 086c4eb..80bd645 100644 --- a/exercises/07-Function-that-returns/README.es.md +++ b/exercises/07-Function-that-returns/README.es.md @@ -1,3 +1,7 @@ +--- +tutorial: "https://www.youtube.com/watch?v=3V15moFzUjI" +--- + # `07` Functions that return Es una muy buena práctica que las funciones devuelvan algo, incluso si es `None`. diff --git a/exercises/07-Function-that-returns/README.md b/exercises/07-Function-that-returns/README.md index 01d7d9c..0103d2d 100755 --- a/exercises/07-Function-that-returns/README.md +++ b/exercises/07-Function-that-returns/README.md @@ -1,5 +1,5 @@ --- -tutorial: "https://www.youtube.com/watch?v=-tqNmngh1PE" +tutorial: "https://www.youtube.com/watch?v=H6Zps4dPqzs" --- # `07` Functions that return diff --git a/exercises/08-Function-parameters/README.es.md b/exercises/08-Function-parameters/README.es.md index 1f81497..a9b4992 100644 --- a/exercises/08-Function-parameters/README.es.md +++ b/exercises/08-Function-parameters/README.es.md @@ -1,3 +1,7 @@ +--- +tutorial: "https://www.youtube.com/watch?v=LuA-x5DYPr4" +--- + # `08` Function parameters Puedes especificar tantos parámetros como desees en una función. diff --git a/exercises/08-Function-parameters/README.md b/exercises/08-Function-parameters/README.md index 6ad2d14..86e9167 100755 --- a/exercises/08-Function-parameters/README.md +++ b/exercises/08-Function-parameters/README.md @@ -1,5 +1,5 @@ --- -tutorial: "https://www.youtube.com/watch?v=uaiDxW4LJNA" +tutorial: "https://www.youtube.com/watch?v=BCMQF44H-BY" --- # `08` Function parameters diff --git a/exercises/09-Array-Methods/README.es.md b/exercises/09-Array-Methods/README.es.md index 033cec3..16712e8 100644 --- a/exercises/09-Array-Methods/README.es.md +++ b/exercises/09-Array-Methods/README.es.md @@ -1,3 +1,7 @@ +--- +tutorial: "https://www.youtube.com/watch?v=Ne8ZRZTSaQA" +--- + # `09` List Methods ## 📝 Instrucciones: diff --git a/exercises/09-Array-Methods/README.md b/exercises/09-Array-Methods/README.md index c3568b0..b5812cd 100755 --- a/exercises/09-Array-Methods/README.md +++ b/exercises/09-Array-Methods/README.md @@ -1,5 +1,5 @@ --- -tutorial: "https://www.youtube.com/watch?v=jBXve_vh7dU" +tutorial: "https://www.youtube.com/watch?v=5Wk2a16nnUY" --- # `09` List Methods From 7c26eba3c9c902f7e9adbc5a9e148fbca28a6e3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charly=20Chac=C3=B3n?= <107764250+Charlytoc@users.noreply.github.com> Date: Mon, 1 Apr 2024 13:24:48 -0500 Subject: [PATCH 106/123] Update devcontainer.json --- .devcontainer/devcontainer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 8c084e4..688c6e9 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -21,7 +21,7 @@ "extensions": ["learn-pack.learnpack-vscode"] } }, - "onCreateCommand": "pip3 install pytest==6.2.5 pytest-testdox mock && npm i @learnpack/learnpack@2.1.35 -g && learnpack plugins:install @learnpack/python@1.0.0" + "onCreateCommand": "pip3 install pytest==6.2.5 pytest-testdox mock && npm i @learnpack/learnpack@2.1.39 -g && learnpack plugins:install @learnpack/python@1.0.3" // Features to add to the dev container. More info: https://containers.dev/features. // "features": {}, From f52e6995f44d270b2b6d9bf0186529ce7b83e19a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charly=20Chac=C3=B3n?= <107764250+Charlytoc@users.noreply.github.com> Date: Mon, 1 Apr 2024 13:25:05 -0500 Subject: [PATCH 107/123] Update learn.json --- learn.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/learn.json b/learn.json index 130bb24..71b303c 100644 --- a/learn.json +++ b/learn.json @@ -19,7 +19,7 @@ "graded": true, "editor": { - "version": "3.1.9" + "version": "3.1.23" } } From b3f3854307d9fd7847a1a2feb6bd02b25fce842c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charly=20Chac=C3=B3n?= <107764250+Charlytoc@users.noreply.github.com> Date: Mon, 1 Apr 2024 14:41:07 -0500 Subject: [PATCH 108/123] Update .gitpod.Dockerfile --- .gitpod.Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitpod.Dockerfile b/.gitpod.Dockerfile index e32e2b3..4252a17 100644 --- a/.gitpod.Dockerfile +++ b/.gitpod.Dockerfile @@ -25,4 +25,4 @@ RUN echo "unset DATABASE_URL" >> $HOME/.bashrc RUN echo "export DATABASE_URL" >> $HOME/.bashrc RUN pip3 install pytest==6.2.5 pytest-testdox mock -RUN npm i -g @learnpack/learnpack@2.1.20 && learnpack plugins:install @learnpack/python@1.0.0 +RUN npm i @learnpack/learnpack@2.1.39 -g && learnpack plugins:install @learnpack/python@1.0.3 From 32681aab04d6b2eecbcd782e0c9a13ee7e71809e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charly=20Chac=C3=B3n?= <107764250+Charlytoc@users.noreply.github.com> Date: Sun, 7 Apr 2024 14:58:58 -0500 Subject: [PATCH 109/123] Update devcontainer.json --- .devcontainer/devcontainer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 688c6e9..09c6c79 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -21,7 +21,7 @@ "extensions": ["learn-pack.learnpack-vscode"] } }, - "onCreateCommand": "pip3 install pytest==6.2.5 pytest-testdox mock && npm i @learnpack/learnpack@2.1.39 -g && learnpack plugins:install @learnpack/python@1.0.3" + "onCreateCommand": "pip3 install pytest==6.2.5 pytest-testdox mock && npm i @learnpack/learnpack@2.1.47 -g && learnpack plugins:install @learnpack/python@1.0.3" // Features to add to the dev container. More info: https://containers.dev/features. // "features": {}, From ec168e1fe8879a76926932edbb3008965f95e0ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charly=20Chac=C3=B3n?= <107764250+Charlytoc@users.noreply.github.com> Date: Sun, 7 Apr 2024 14:59:12 -0500 Subject: [PATCH 110/123] Update .gitpod.Dockerfile --- .gitpod.Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitpod.Dockerfile b/.gitpod.Dockerfile index 4252a17..25ac192 100644 --- a/.gitpod.Dockerfile +++ b/.gitpod.Dockerfile @@ -25,4 +25,4 @@ RUN echo "unset DATABASE_URL" >> $HOME/.bashrc RUN echo "export DATABASE_URL" >> $HOME/.bashrc RUN pip3 install pytest==6.2.5 pytest-testdox mock -RUN npm i @learnpack/learnpack@2.1.39 -g && learnpack plugins:install @learnpack/python@1.0.3 +RUN npm i @learnpack/learnpack@2.1.47 -g && learnpack plugins:install @learnpack/python@1.0.3 From ed8f598da25c748c10e6f72c8bed40a7db45b098 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charly=20Chac=C3=B3n?= <107764250+Charlytoc@users.noreply.github.com> Date: Tue, 23 Apr 2024 14:38:33 -0500 Subject: [PATCH 111/123] Update learn.json --- learn.json | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/learn.json b/learn.json index 71b303c..7200c58 100644 --- a/learn.json +++ b/learn.json @@ -20,6 +20,13 @@ "editor": { "version": "3.1.23" + }, + "video": { + "intro": { + "es": "https://www.youtube.com/watch?v=SD9lqR67yMY", + "en": "https://www.youtube.com/watch?v=06rxSj-9wM4" } + } + } From 8e51e9dd257471afc20468532d7a196d94d7dd04 Mon Sep 17 00:00:00 2001 From: Charlytoc Date: Tue, 23 Apr 2024 19:22:04 -0500 Subject: [PATCH 112/123] Update with new version of editor and cli --- .devcontainer/devcontainer.json | 4 +++- learn.json | 11 +++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 09c6c79..9bf9747 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,3 +1,4 @@ + // For format details, see https://aka.ms/devcontainer.json. For config options, see the // README at: https://github.com/devcontainers/templates/tree/main/src/python { @@ -21,7 +22,7 @@ "extensions": ["learn-pack.learnpack-vscode"] } }, - "onCreateCommand": "pip3 install pytest==6.2.5 pytest-testdox mock && npm i @learnpack/learnpack@2.1.47 -g && learnpack plugins:install @learnpack/python@1.0.3" + "onCreateCommand": "pip3 install pytest==6.2.5 pytest-testdox mock && npm i @learnpack/learnpack@2.1.50 -g && learnpack plugins:install @learnpack/python@1.0.3" // Features to add to the dev container. More info: https://containers.dev/features. // "features": {}, @@ -38,3 +39,4 @@ // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. // "remoteUser": "root" } + diff --git a/learn.json b/learn.json index 7200c58..badbf1d 100644 --- a/learn.json +++ b/learn.json @@ -18,9 +18,12 @@ "bugsLink": "https://github.com/learnpack/learnpack/issues/new", "graded": true, - "editor": { - "version": "3.1.23" - }, + "editor": { + "version": "3.1.36" + }, + "telemetry": { + "batch": "https://breathecode.herokuapp.com/v1/assignment/me/telemetry" + }, "video": { "intro": { "es": "https://www.youtube.com/watch?v=SD9lqR67yMY", @@ -29,4 +32,4 @@ } -} +} \ No newline at end of file From 9bbaedab6f0b80fdc433e68ce1bcd9771ed67c2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charly=20Chac=C3=B3n?= <107764250+Charlytoc@users.noreply.github.com> Date: Mon, 1 Jul 2024 17:35:08 -0500 Subject: [PATCH 113/123] Update learn.json --- learn.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/learn.json b/learn.json index badbf1d..e08f7b5 100644 --- a/learn.json +++ b/learn.json @@ -19,7 +19,7 @@ "graded": true, "editor": { - "version": "3.1.36" + "version": "3.1.40" }, "telemetry": { "batch": "https://breathecode.herokuapp.com/v1/assignment/me/telemetry" @@ -32,4 +32,4 @@ } -} \ No newline at end of file +} From ec0d8817e2cf2a24b67caff4f5f4a6150a73813a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charly=20Chac=C3=B3n?= <107764250+Charlytoc@users.noreply.github.com> Date: Mon, 1 Jul 2024 17:35:24 -0500 Subject: [PATCH 114/123] Update devcontainer.json --- .devcontainer/devcontainer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 9bf9747..9d3733d 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -22,7 +22,7 @@ "extensions": ["learn-pack.learnpack-vscode"] } }, - "onCreateCommand": "pip3 install pytest==6.2.5 pytest-testdox mock && npm i @learnpack/learnpack@2.1.50 -g && learnpack plugins:install @learnpack/python@1.0.3" + "onCreateCommand": "pip3 install pytest==6.2.5 pytest-testdox mock && npm i @learnpack/learnpack@2.1.56 -g && learnpack plugins:install @learnpack/python@1.0.3" // Features to add to the dev container. More info: https://containers.dev/features. // "features": {}, From 6ff2ec8910a8a77e52ca32957c0153ed55b41eb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charly=20Chac=C3=B3n?= <107764250+Charlytoc@users.noreply.github.com> Date: Wed, 28 Aug 2024 18:29:36 -0500 Subject: [PATCH 115/123] Update devcontainer.json --- .devcontainer/devcontainer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 9d3733d..47cbc21 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -22,7 +22,7 @@ "extensions": ["learn-pack.learnpack-vscode"] } }, - "onCreateCommand": "pip3 install pytest==6.2.5 pytest-testdox mock && npm i @learnpack/learnpack@2.1.56 -g && learnpack plugins:install @learnpack/python@1.0.3" + "onCreateCommand": "pip3 install pytest==6.2.5 pytest-testdox mock && npm i @learnpack/learnpack@4.0.10 -g && learnpack plugins:install @learnpack/python@1.0.3" // Features to add to the dev container. More info: https://containers.dev/features. // "features": {}, From f960cdfadf828c61496fba8d36b7152c96653185 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charly=20Chac=C3=B3n?= <107764250+Charlytoc@users.noreply.github.com> Date: Wed, 28 Aug 2024 18:29:58 -0500 Subject: [PATCH 116/123] Update learn.json --- learn.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/learn.json b/learn.json index e08f7b5..bdcd1f5 100644 --- a/learn.json +++ b/learn.json @@ -19,7 +19,7 @@ "graded": true, "editor": { - "version": "3.1.40" + "version": "4.0.6" }, "telemetry": { "batch": "https://breathecode.herokuapp.com/v1/assignment/me/telemetry" From a406293bfc1b3b717e851295fb310efcf8cb700e Mon Sep 17 00:00:00 2001 From: Alejandro Sanchez Date: Fri, 15 Nov 2024 14:33:07 -0500 Subject: [PATCH 117/123] Update learn.json --- learn.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/learn.json b/learn.json index bdcd1f5..6c765eb 100644 --- a/learn.json +++ b/learn.json @@ -19,7 +19,7 @@ "graded": true, "editor": { - "version": "4.0.6" + "version": "4.0" }, "telemetry": { "batch": "https://breathecode.herokuapp.com/v1/assignment/me/telemetry" From 3dc8fd90d9acd705ef43f39e5ecdba3e204beea4 Mon Sep 17 00:00:00 2001 From: Alejandro Sanchez Date: Wed, 15 Jan 2025 14:46:25 -0500 Subject: [PATCH 118/123] Update learn.json --- learn.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/learn.json b/learn.json index 6c765eb..dc1266d 100644 --- a/learn.json +++ b/learn.json @@ -19,10 +19,10 @@ "graded": true, "editor": { - "version": "4.0" + "version": "5.0" }, "telemetry": { - "batch": "https://breathecode.herokuapp.com/v1/assignment/me/telemetry" + "batch": "https://breathecode.herokuapp.com/v1/assignment/me/telemetry?asset_id=147" }, "video": { "intro": { From 7a4bff1c198bec9accc54a99b03de0723cb68204 Mon Sep 17 00:00:00 2001 From: Alejandro Sanchez Date: Wed, 15 Jan 2025 14:46:42 -0500 Subject: [PATCH 119/123] Update devcontainer.json --- .devcontainer/devcontainer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 47cbc21..b6cc910 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -22,7 +22,7 @@ "extensions": ["learn-pack.learnpack-vscode"] } }, - "onCreateCommand": "pip3 install pytest==6.2.5 pytest-testdox mock && npm i @learnpack/learnpack@4.0.10 -g && learnpack plugins:install @learnpack/python@1.0.3" + "onCreateCommand": "pip3 install pytest==6.2.5 pytest-testdox mock && npm i @learnpack/learnpack@5.0.7 -g && learnpack plugins:install @learnpack/python@1.0.3" // Features to add to the dev container. More info: https://containers.dev/features. // "features": {}, From 05b142a804402f70bf60315e77af8cf797735599 Mon Sep 17 00:00:00 2001 From: lorenagubaira <102861577+Lorenagubaira@users.noreply.github.com> Date: Mon, 27 Jan 2025 20:38:45 -0400 Subject: [PATCH 120/123] Update devcontainer.json --- .devcontainer/devcontainer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index b6cc910..72c9a22 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -22,7 +22,7 @@ "extensions": ["learn-pack.learnpack-vscode"] } }, - "onCreateCommand": "pip3 install pytest==6.2.5 pytest-testdox mock && npm i @learnpack/learnpack@5.0.7 -g && learnpack plugins:install @learnpack/python@1.0.3" + "onCreateCommand": "pip3 install pytest==6.2.5 pytest-testdox mock && npm i @learnpack/learnpack@5.0.13 -g && learnpack plugins:install @learnpack/python@1.0.6" // Features to add to the dev container. More info: https://containers.dev/features. // "features": {}, From 2952cca4eefdf71cb60a7f6f9fff6a431e3ca29b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charly=20Chac=C3=B3n?= <107764250+Charlytoc@users.noreply.github.com> Date: Mon, 27 Jan 2025 23:16:30 -0500 Subject: [PATCH 121/123] Update devcontainer.json --- .devcontainer/devcontainer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 72c9a22..174bdc0 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -22,7 +22,7 @@ "extensions": ["learn-pack.learnpack-vscode"] } }, - "onCreateCommand": "pip3 install pytest==6.2.5 pytest-testdox mock && npm i @learnpack/learnpack@5.0.13 -g && learnpack plugins:install @learnpack/python@1.0.6" + "onCreateCommand": "pip3 install pytest==6.2.5 pytest-testdox mock && npm i @learnpack/learnpack@5.0.14 -g && learnpack plugins:install @learnpack/python@1.0.6" // Features to add to the dev container. More info: https://containers.dev/features. // "features": {}, From cd49ba87027eb698c311a5cbcb3264370a7a78fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charly=20Chac=C3=B3n?= <107764250+Charlytoc@users.noreply.github.com> Date: Sat, 1 Feb 2025 07:26:54 -0500 Subject: [PATCH 122/123] Update devcontainer.json --- .devcontainer/devcontainer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 174bdc0..8d6afa7 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -22,7 +22,7 @@ "extensions": ["learn-pack.learnpack-vscode"] } }, - "onCreateCommand": "pip3 install pytest==6.2.5 pytest-testdox mock && npm i @learnpack/learnpack@5.0.14 -g && learnpack plugins:install @learnpack/python@1.0.6" + "onCreateCommand": "pip3 install pytest==6.2.5 pytest-testdox mock && npm i @learnpack/learnpack@5.0.19 -g && learnpack plugins:install @learnpack/python@1.0.6" // Features to add to the dev container. More info: https://containers.dev/features. // "features": {}, From 2b1369747df5cd3acb9ae2e0b52b2295f5845cef Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Fri, 28 Feb 2025 21:46:30 +0000 Subject: [PATCH 123/123] Update workflow files --- .github/workflows/learnpack-audit.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/learnpack-audit.yml b/.github/workflows/learnpack-audit.yml index 52644d8..95814c2 100644 --- a/.github/workflows/learnpack-audit.yml +++ b/.github/workflows/learnpack-audit.yml @@ -5,9 +5,9 @@ name: Learnpack audit on: push: - branches: [ master ] + branches: [ main ] pull_request: - branches: [ master ] + branches: [ main ] jobs: build: @@ -16,7 +16,7 @@ jobs: strategy: matrix: - node-version: [14.x] + node-version: [20.x] # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ steps: