From b572ef67eedfa4d6ebe835d9dc9869f9dc7d087d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Nacho=20L=C3=B3pez?=
<145539062+KrilinZ@users.noreply.github.com>
Date: Mon, 3 Aug 2026 14:14:45 +0200
Subject: [PATCH 1/2] docs(readme): rewrite for clarity, SEO and AI answer
engines
---
README.md | 182 ++++++++++++++++++++++++++++++++++++++++--------------
1 file changed, 135 insertions(+), 47 deletions(-)
diff --git a/README.md b/README.md
index 18994a9..ba82c12 100644
--- a/README.md
+++ b/README.md
@@ -1,86 +1,174 @@
-# 🐍 Python Functions Tutorial and Exercises
+
-By
@alesanchezr and
other contributors at
4Geeks Academy
+# Learn Python Functions Interactively
-

+  [](https://codespaces.new/?repo=4GeeksAcademy/python-functions-programming-exercises)
+
+
+
+*These instructions are also available in [🇪🇸 Spanish](https://github.com/4GeeksAcademy/python-functions-programming-exercises/blob/HEAD/README.es.md).*
-*Estas instrucciones [están disponibles en 🇪🇸 español](https://github.com/4GeeksAcademy/python-functions-programming-exercises/blob/master/README.es.md) :es:*
+This LearnPack tutorial teaches Python functions through 10 interactive exercises: one welcome page plus 9 auto-graded challenges. You will print your first line on the console, define and call functions, write lambda expressions, chain the return value of one function into another, build a function with five parameters and sort a list of names. Each graded exercise ships a pytest file and a video walkthrough, in English and Spanish. Estimated time: 10 hours.
+
+
+## 📋 About this tutorial
-Learn and practice Python Functions. You will see the following concepts:
+- **Difficulty:** easy (beginner level, right after Python basics).
+- **Estimated duration:** 10 hours.
+- **Exercises:** 10 folders — 1 welcome page and 9 graded exercises.
+- **Technologies:** Python 3, pytest, LearnPack.
+- **Grading:** automatic, 9 exercises with a pytest file and 39 individual tests in total.
+- **Extras:** a YouTube walkthrough linked from every exercise and a hidden `solution.hide.py` in each graded exercise.
+- **Languages:** English and Spanish (every exercise has `README.md` and `README.es.md`).
-1. Declaring a function.
+
+
-2. Calling a function.
+## 🎯 What will you learn?
-3. Function scopes.
+The tutorial goes from the very first `print()` to functions that feed other functions, one small step at a time:
-4. Nest functions.
+- How to declare a function with `def`, name its parameters and indent its body correctly.
+- The difference between **defining** a function and **calling** it, and why nothing happens until you call it.
+- How `return` works, and why a function that returns a value is more useful than one that only prints.
+- How to write **lambda functions**: one-line, anonymous functions stored in a variable or passed around as arguments.
+- How to combine functions, using the output of one as the input of the next.
+- How to design a function with several parameters and pick names that explain themselves.
+- How to use built-in list helpers such as `sorted()` inside your own function.
-5. Recursive functions and many other functional concepts.
+## 👀 What will you build?
-> Note: The entire tutorial is 👆 interactive, ✅ auto-graded and with 📹 video tutorials.
+Nine graded exercises, each one a tiny Python program you complete inside `app.py`:
-These exercises were built in collaboration, we need you! If you find any bugs or misspellings, please contribute and report them.
+1. **`01` Hello World** — use `print()` to display exactly `Hello World` on the console.
+2. **`02` What is a function?** — reuse the `sum(number1, number2)` function you are given to store the result of `3445324 + 53454423` in a variable called `super_duper`.
+3. **`03` Calling a function** — call the `calculate_area(length, width)` function you are given three times and store the area of each square in `square_area1`, `square_area2` and `square_area3`: 16, 4 and 25.
+4. **`04` Defining vs. calling a function** — define `multi` from scratch so it receives two numbers and returns their multiplication.
+5. **`05` Lambda functions** — assign a lambda to `is_odd` that returns `True` when a number is odd and `False` when it is not.
+6. **`06` Lambda functions II** — assign a lambda to `rapid` that returns a string without its last character, so `"maria"` becomes `"mari"`.
+7. **`07` Functions that return** — chain the two converters you are given, `dollar_to_euro` and `euro_to_yen`, to print how much 137 dollars are worth in yen: `20159.139`.
+8. **`08` Function parameters** — build `render_person` with five parameters so it returns a sentence like `Bob is a 23 years old male born in 05/22/1983 with green eyes`.
+9. **`09` List methods** — write `sort_names` so that, given a list of names, it returns them in alphabetical order.
-
+The tenth folder, `00-Welcome`, is the introduction: no code, no test, just the roadmap and the intro video.
-## One click installation (recommended):
+## 🎓 What do you need before starting?
-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).
+- **Python fundamentals only.** Variables, numbers, strings and `print()` are enough; functions are exactly what this tutorial teaches you.
+- **A browser**, if you run it on GitHub Codespaces or on the online platform. Nothing to install.
+- **Python 3 and Node.js 14+**, only if you prefer to run the exercises on your own machine with LearnPack.
+- **No previous experience with pytest.** The tests are already written; you only read their messages.
-> 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`
+## ✅ How does the automatic grading work?
-## Local Installation
+Each of the 9 graded exercises includes a test file written with pytest (`test.py` in exercises `01` and `07`, `tests.py` in the rest). When you press the compile or test button, LearnPack runs those assertions against your `app.py` and shows you a green or red line per check, with the message declared in `@pytest.mark.it(...)`, for example *"The function multi must receive two numbers and return their multiplication"*.
-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:
+The tests verify three different things, and it helps a lot to know which one is failing:
-```bash
-$ npm i -g @learnpack/learnpack@2.1.20 && learnpack plugins:install @learnpack/python@1.0.0
-```
+- **The source code of `app.py`**, matched with a regular expression. Exercise `05` literally searches for `is_odd = lambda`, and exercise `03` checks that somewhere in your file you write `= calculate_area(`.
+- **The value your function returns**, by importing it and calling it with fixed inputs, such as `app.multi(3, 4) == 12` or `app.calculate_area(5, 4) == 20`.
+- **The text printed on the console**, captured and compared character by character, such as `"20159.139\n"` in exercise `07`.
-2. Clone or download this repository in your local environment.
+The tests are deliberately strict, so treat a red line as a hint about the exact wording or the exact syntax being asked for, not as a verdict on your logic.
-```bash
-$ git clone https://github.com/4GeeksAcademy/python-functions-programming-exercises.git
-$ cd python-functions-programming-exercises
-```
+## 💡 What mistakes should you avoid?
-> Note: Once you finish downloading, you will find an "exercises" folder that contains all the exercises within.
+- **Printing when the exercise asks you to return.** In `08` the test calls `render_person('ax','b','c','d','e')` and compares the returned string, while `app.py` already prints the result. A function that prints and returns nothing fails.
+- **Getting the parameter order wrong in `08`.** The expected sentence is `ax is a d years old e born in b with c eyes`, so the five parameters go in this order: name, birth date, eye colour, age, gender.
+- **Using `def` where a lambda is required.** In `05` and `06` the test reads your file looking for `is_odd = lambda` and `rapid = lambda`. A regular `def` fails the check even when the behaviour is correct.
+- **Returning `list.sort()` in `09`.** The `sort()` method sorts in place and returns `None`. Return `sorted(names)` instead, and keep the `print(sort_names(names))` line, because the test compares the console output with `['Bob', 'Dilan', 'John', 'Kenny', 'Tom']`.
+- **Formatting or rounding the number in `07`.** The console must show exactly `20159.139`: call `dollar_to_euro(137)` first and pass its result to `euro_to_yen`, without touching the decimals.
+- **Deleting the code you are given.** Exercise `02` needs the `sum()` function it hands you, because the test imports it. In `04`, `06`, `08` and `09` the lines marked as "do not change" call your function with fixed values, and in `09` the test reads exactly what that line prints.
-3. Start the tutorial/exercises by running the following command from the root of the project:
+## ❓ Frequently asked questions
-```bash
-$ pip3 install pytest==6.2.5 pytest-testdox mock
-$ learnpack start
-```
+### Do I need to install Python to start the exercises?
-
+No. Opening the repository in GitHub Codespaces gives you a ready environment with Python, LearnPack and the exercises already loaded, and the same tutorial also runs on the online platform. Installing anything locally is optional and only requires Python 3 and Node.js 14 or higher.
-## How are the exercises organized?
+### What is the difference between `def` and a lambda function in Python?
-Each exercise is a small Python application containing the following files:
+A function declared with `def` has a name, can span as many lines as you need and returns a value only when you write `return`. A [lambda](https://docs.python.org/3/reference/expressions.html#lambda) is a single expression with no name of its own, usually stored in a variable such as `is_odd = lambda num: num % 2 != 0`, and it returns the result of that expression automatically. Exercises `04` to `06` make you write both styles for the same kind of problem.
-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.
+### How long does this Python functions tutorial take?
-> 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.
+The package is estimated at 10 hours and rated as easy. Its 9 graded exercises are short, so many people finish them in a couple of sessions; the time also depends on how much you experiment with the code beyond what the test asks for.
-## Contributors
+### Are these exercises free, and can I reuse them?
-Thanks to these wonderful people ([emoji key](https://github.com/kentcdodds/all-contributors#emoji-key)):
+Access does not cost anything, and the code you write inside `app.py` is yours. The tutorial content, however, is not open source: the [LICENSE.md](https://github.com/4GeeksAcademy/python-functions-programming-exercises/blob/HEAD/LICENSE.md) file of this 4Geeks Academy tutorial reserves all intellectual property rights and does not allow you to republish, sell, sub-license or redistribute the material.
+
+### Why does my exercise fail when the result looks right?
+
+Because most checks compare strings exactly. A missing capital letter in `Hello World`, an extra space, a rounded decimal or a `def` where a lambda was requested is enough to turn the check red. Read the sentence next to the failing test: it names the function, the input and the value expected.
+
+### Are the exercises available in Spanish?
+
+Yes. All 10 folders ship both `README.md` and `README.es.md`, so instructions, hints and examples are fully translated, and the tutorial is published in Spanish as well. The code, the function names and the test messages stay in English, as they do in real projects.
+
+
+## 📚 Related tutorials
+
+If you want to keep practising Python with the same interactive, auto-graded format:
+
+1. [Learn Python Interactively (beginner)](https://4geeks.com/en/interactive-exercise/python-beginner-exercises) — variables, conditionals and the basics you need before this tutorial.
+2. [Learn Python Loops and Lists Interactively](https://4geeks.com/en/interactive-exercise/python-loops-lists-exercises) — the natural next step after functions.
+3. [Learn Object Oriented Programming with Python](https://4geeks.com/en/interactive-exercise/object-oriented-programing-with-python) — classes, objects and methods.
+4. [Master Python by practice](https://4geeks.com/en/interactive-exercise/master-python-exercises) — a longer set of challenges to consolidate everything.
+5. [Working with Functions in Python](https://4geeks.com/lesson/working-with-functions-python) — the written lesson behind these exercises.
-1. [Alejandro Sanchez (alesanchezr)](https://github.com/alesanchezr), contribution: (coder) 💻, (idea) 🤔, (build-tests) ⚠️, (pull-request-review) 👀, (build-tutorial) ✅ (documentation) 📖
+## 🚀 How to start
-2. [Paolo (plucodev)](https://github.com/plucodev), contribution: (bug reports) 🐛, (coder) 💻, (translation) 🌎
+The fastest way is one click: [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).
-3. [Marco Gómez (marcogonzalo)](https://github.com/marcogonzalo), contribution: (bug reports) :🐛, (translation) 🌎
+Once VS Code opens, the LearnPack exercises should start on their own. If they do not, type `learnpack start` in the terminal.
+
-This project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification.
+## 💻 Local installation
-Contributions of any kind are welcome!
+1. Install [LearnPack](https://learnpack.co) and its Python plugin. You need Node.js 14+ and Python 3+ first.
-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).
+ ```bash
+ npm i -g @learnpack/learnpack@2.1.20 && learnpack plugins:install @learnpack/python@1.0.0
+ ```
+
+2. Clone or download this repository into your local environment.
+
+ ```bash
+ git clone https://github.com/4GeeksAcademy/python-functions-programming-exercises.git
+ cd python-functions-programming-exercises
+ ```
+
+3. Install the testing dependencies and start the tutorial from the root of the project.
+
+ ```bash
+ pip3 install pytest==6.2.5 pytest-testdox mock
+ learnpack start
+ ```
+
+Once the download finishes you will find an `exercises` folder containing all the exercises.
+
+## 📝 How the exercises are organized
+
+Every graded exercise is a small Python application with the same files:
+
+1. **`app.py`** — the entry file you edit and the one the computer runs.
+2. **`README.md`** and **`README.es.md`** — the instructions, hints and the video walkthrough, in both languages.
+3. **`test.py`** or **`tests.py`** — the grading script. You do not need to open it, but reading it is the fastest way to understand what is being asked.
+4. **`solution.hide.py`** — a reference solution that LearnPack keeps hidden while you work.
+
+## 🤝 Contributors
+
+Thanks to these wonderful people ([emoji key](https://github.com/kentcdodds/all-contributors#emoji-key)):
+
+1. [Alejandro Sánchez (alesanchezr)](https://github.com/alesanchezr) — coder 💻, idea 🤔, build-tests ⚠️, pull-request-review 👀, build-tutorial ✅, documentation 📖.
+2. [Paolo (plucodev)](https://github.com/plucodev) — bug reports 🐛, coder 💻, translation 🌎.
+3. [Marco Gómez (marcogonzalo)](https://github.com/marcogonzalo) — bug reports 🐛, translation 🌎.
+
+This project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification. Contributions of any kind are welcome: if you find a bug or a misspelling, [open an issue](https://github.com/learnpack/learnpack/issues/new) or send a pull request. See [all contributors](https://github.com/4GeeksAcademy/python-functions-programming-exercises/graphs/contributors).
+
+This and many other exercises are built by students as part of the 4Geeks Academy [Coding Bootcamp](https://4geeksacademy.com/us/coding-bootcamp), led by [Alejandro Sánchez](https://github.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 our [Data Science and Machine Learning Bootcamp](https://4geeksacademy.com/us/coding-bootcamps/datascience-machine-learning).
+
From 435906ccbf0da9e5d2dd525f0624fdb8f54fcf6d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Nacho=20L=C3=B3pez?=
<145539062+KrilinZ@users.noreply.github.com>
Date: Mon, 3 Aug 2026 14:14:46 +0200
Subject: [PATCH 2/2] docs(readme): rewrite for clarity, SEO and AI answer
engines
---
README.es.md | 186 ++++++++++++++++++++++++++++++++++++++-------------
1 file changed, 138 insertions(+), 48 deletions(-)
diff --git a/README.es.md b/README.es.md
index 70a7973..29aff27 100644
--- a/README.es.md
+++ b/README.es.md
@@ -1,84 +1,174 @@
-# 🐍 Tutorial y Ejercicios sobre Funciones de Python
-Creado por @alesanchezr y otros contribuyentes en 4Geeks Academy
+
-

+# Aprende las funciones de Python Interactivamente
+
+  [](https://codespaces.new/?repo=4GeeksAcademy/python-functions-programming-exercises)
+
+
+
+*Estas instrucciones también están disponibles en [🇺🇸 inglés](https://github.com/4GeeksAcademy/python-functions-programming-exercises/blob/HEAD/README.md).*
-Aprende y practica las funciones de Python. Vas a ver los siguientes conceptos:
+Este tutorial de LearnPack enseña las funciones de Python con 10 ejercicios interactivos: una página de bienvenida y 9 retos autocorregidos. Vas a imprimir tu primera línea en la consola, declarar y llamar funciones, escribir expresiones lambda, encadenar el resultado de una función dentro de otra, construir una función de cinco parámetros y ordenar una lista de nombres. Cada ejercicio corregido trae pruebas con pytest y un vídeo. Duración estimada: 10 horas.
-1. Declarar una función.
+
+## 📋 Ficha del tutorial
-2. Llamar a una función.
+- **Dificultad:** fácil (nivel principiante, justo después de lo básico de Python).
+- **Duración estimada:** 10 horas.
+- **Ejercicios:** 10 carpetas — 1 de bienvenida y 9 con corrección automática.
+- **Tecnologías:** Python 3, pytest y LearnPack.
+- **Corrección:** automática, 9 ejercicios con fichero de pruebas y 39 comprobaciones en total.
+- **Extras:** un vídeo de YouTube enlazado en cada ejercicio y un `solution.hide.py` de referencia en cada ejercicio corregido.
+- **Idiomas:** español e inglés (cada ejercicio tiene `README.es.md` y `README.md`).
-3. Alcance de una función.
+
+
-4. Funciones anidadas.
+## 🎯 ¿Qué vas a aprender?
-5. Recursividad de funciones y muchos otros conceptos funcionales.
+El tutorial avanza desde el primer `print()` hasta funciones que se alimentan de otras funciones, paso a paso:
-Todo el tutorial es 👆 interactivo, ✅ calificado automáticamente y con 📹 video tutoriales.
+- Cómo declarar una función con `def`, ponerle parámetros e indentar bien su cuerpo.
+- La diferencia entre **declarar** una función y **llamarla**, y por qué no pasa nada hasta que la llamas.
+- Cómo funciona el `return` y por qué una función que devuelve un valor da mucho más juego que una que solo imprime.
+- Cómo escribir **funciones lambda**: funciones de una sola línea, sin nombre propio, que guardas en una variable o pasas como argumento.
+- Cómo combinar funciones y usar la salida de una como entrada de la siguiente.
+- Cómo diseñar una función con varios parámetros y elegir nombres que se expliquen solos.
+- Cómo aprovechar utilidades de listas como `sorted()` dentro de tus propias funciones.
-Estos ejercicios son colaborativos, ¡te necesitamos! Si encuentras algún error o falta de ortografía, por favor contribuye y repórtalo.
+## 👀 ¿Qué vas a construir?
-
+Nueve ejercicios corregidos automáticamente; cada uno es un programa pequeñito que completas dentro de `app.py`:
-## Instalación en un clic (recomendado)
+1. **`01` Hello World** — usa `print()` para mostrar exactamente `Hello World` en la consola.
+2. **`02` ¿Qué es una función?** — reutiliza la función `sum(number1, number2)` que ya viene escrita para guardar el resultado de `3445324 + 53454423` en una variable llamada `super_duper`.
+3. **`03` Llamar a una función** — llama tres veces a la función `calculate_area(length, width)` que ya viene escrita y guarda el área de cada cuadrado en `square_area1`, `square_area2` y `square_area3`: 16, 4 y 25.
+4. **`04` Declarar vs. llamar** — declara desde cero la función `multi`, que recibe dos números y devuelve su multiplicación.
+5. **`05` Funciones lambda** — asigna a `is_odd` una lambda que devuelva `True` cuando el número sea impar y `False` cuando no lo sea.
+6. **`06` Funciones lambda II** — asigna a `rapid` una lambda que devuelva la misma cadena sin su último carácter, de modo que `"maria"` se convierta en `"mari"`.
+7. **`07` Funciones que devuelven** — encadena los dos conversores que se te dan, `dollar_to_euro` y `euro_to_yen`, para imprimir cuánto valen 137 dólares en yenes: `20159.139`.
+8. **`08` Parámetros de una función** — construye `render_person` con cinco parámetros para que devuelva una frase como `Bob is a 23 years old male born in 05/22/1983 with green eyes`.
+9. **`09` Métodos de listas** — escribe `sort_names` para que, dada una lista de nombres, la devuelva ordenada alfabéticamente.
-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).
+La décima carpeta, `00-Welcome`, es la introducción: sin código ni pruebas, solo el mapa del tutorial y el vídeo de presentación.
-> 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`
+## 🎓 ¿Qué necesitas antes de empezar?
-## Instalación local:
+- **Solo lo básico de Python.** Con variables, números, cadenas y `print()` te sobra; las funciones son justo lo que vienes a aprender aquí.
+- **Un navegador**, si trabajas en GitHub Codespaces o en la plataforma online. No hay nada que instalar.
+- **Python 3 y Node.js 14+**, únicamente si prefieres ejecutar los ejercicios en tu propio ordenador con LearnPack.
+- **Ninguna experiencia previa con pytest.** Las pruebas ya están escritas; tú solo lees sus mensajes.
-1. Asegúrate de instalar [LearnPack](https://learnpack.co), node.js version 14+ y Python version 3+. Este es el comando para instalar LearnPack:
+## ✅ ¿Cómo funciona la corrección automática?
-```bash
-$ npm i -g @learnpack/learnpack@2.1.20 && learnpack plugins:install @learnpack/python@1.0.0
-```
+Cada uno de los 9 ejercicios corregidos incluye un fichero de pruebas hecho con pytest (`test.py` en los ejercicios `01` y `07`, `tests.py` en el resto). Al pulsar el botón de compilar o de probar, LearnPack ejecuta esas comprobaciones contra tu `app.py` y te devuelve una línea verde o roja por cada una, con el mensaje declarado en `@pytest.mark.it(...)`, por ejemplo *"The function multi must receive two numbers and return their multiplication"*.
-2. Clona o descarga este repositorio en tu ambiente local.
+Las pruebas miran tres cosas distintas, y saber cuál está fallando te ahorra mucho tiempo:
-```bash
-$ git clone https://github.com/4GeeksAcademy/python-functions-programming-exercises.git
-$ cd python-functions-programming-exercises
-```
+- **El código fuente de `app.py`**, con una expresión regular. El ejercicio `05` busca literalmente `is_odd = lambda`, y el `03` comprueba que en alguna línea escribas `= calculate_area(`.
+- **El valor que devuelve tu función**, importándola y llamándola con datos fijos, como `app.multi(3, 4) == 12` o `app.calculate_area(5, 4) == 20`.
+- **El texto impreso en la consola**, capturado y comparado carácter a carácter, como `"20159.139\n"` en el ejercicio `07`.
-> Nota: Una vez que termine de descargar, encontrarás la carpeta "exercises" que contiene todos los ejercicios.
+Las pruebas son adrede muy estrictas, así que interpreta una línea roja como una pista sobre la sintaxis o el texto exacto que se te pide, no como un juicio sobre tu lógica.
-3. Comienza el tutorial/ejercicios ejecutando el siguiente comando en la raíz del proyecto:
+## 💡 ¿Qué errores conviene evitar?
-```bash
-$ pip3 install pytest==6.2.5 pytest-testdox mock
-$ learnpack start
-```
+- **Imprimir cuando lo que se pide es devolver.** En el `08` la prueba llama a `render_person('ax','b','c','d','e')` y compara la cadena devuelta, mientras que `app.py` ya se encarga de imprimirla. Una función que solo hace `print` suspende.
+- **Equivocarte con el orden de los parámetros del `08`.** La frase esperada es `ax is a d years old e born in b with c eyes`, así que el orden es: nombre, fecha de nacimiento, color de ojos, edad y género.
+- **Usar `def` donde se pide una lambda.** En el `05` y el `06` la prueba lee tu fichero buscando `is_odd = lambda` y `rapid = lambda`. Un `def` normal falla la comprobación aunque el comportamiento sea correcto.
+- **Devolver `list.sort()` en el `09`.** El método `sort()` ordena la lista en el sitio y devuelve `None`. Devuelve `sorted(names)` y no borres la línea `print(sort_names(names))`, porque la prueba compara la salida de la consola con `['Bob', 'Dilan', 'John', 'Kenny', 'Tom']`.
+- **Formatear o redondear el número del `07`.** La consola tiene que mostrar exactamente `20159.139`: llama primero a `dollar_to_euro(137)` y pasa ese resultado a `euro_to_yen`, sin tocar los decimales.
+- **Borrar el código que ya viene escrito.** El `02` necesita la función `sum()` que te dan, porque la prueba la importa. En el `04`, el `06`, el `08` y el `09` las líneas marcadas como "no cambiar" llaman a tu función con valores fijos, y en el `09` la prueba lee exactamente lo que imprime esa línea.
-
+## ❓ Preguntas frecuentes
-## ¿Cómo están organizados los ejercicios?
+### ¿Necesito instalar Python para empezar?
-Cada ejercicio es un pequeño proyecto en Python que contiene los siguientes archivos:
+No. Abriendo el repositorio en GitHub Codespaces tienes un entorno listo con Python, LearnPack y los ejercicios ya cargados, y el mismo tutorial también se ejecuta en la plataforma online. Instalarlo en local es opcional y solo requiere Python 3 y Node.js 14 o superior.
-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.
+### ¿En qué se diferencia una función `def` de una función lambda en Python?
-> 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.
+Una función declarada con `def` tiene nombre, ocupa las líneas que necesites y solo devuelve un valor cuando escribes `return`. Una [lambda](https://docs.python.org/3/reference/expressions.html#lambda) es una única expresión sin nombre propio, que normalmente guardas en una variable (`is_odd = lambda num: num % 2 != 0`) y que devuelve el resultado de esa expresión automáticamente. Los ejercicios `04` a `06` te hacen escribir los dos estilos para el mismo tipo de problema.
-## Colaboradores
-
-Gracias a estas personas maravillosas ([emoji key](https://github.com/kentcdodds/all-contributors#emoji-key)):
+### ¿Cuánto se tarda en terminar el tutorial de funciones?
+
+El paquete está estimado en 10 horas y su dificultad es fácil. Los 9 ejercicios corregidos son cortos, así que mucha gente los termina en un par de sesiones; el tiempo real depende de cuánto experimentes con el código más allá de lo que te pide la prueba.
+
+### ¿Son gratis estos ejercicios? ¿Puedo reutilizarlos?
+
+Acceder no cuesta nada y el código que escribas en `app.py` es tuyo. El contenido del tutorial, en cambio, no es de código abierto: el fichero [LICENSE.md](https://github.com/4GeeksAcademy/python-functions-programming-exercises/blob/HEAD/LICENSE.md) de este tutorial de 4Geeks Academy reserva todos los derechos de propiedad intelectual y no permite republicar, vender, sublicenciar ni redistribuir el material.
+
+### ¿Por qué falla el ejercicio si mi resultado parece correcto?
+
+Porque casi todas las comprobaciones comparan cadenas exactas. Una mayúscula que falta en `Hello World`, un espacio de más, un decimal redondeado o un `def` donde se pedía una lambda bastan para dejar la línea en rojo. Lee la frase que acompaña a la prueba fallida: te dice la función, los datos de entrada y el valor esperado.
+
+### ¿Los ejercicios están también en inglés?
+
+Sí. Las 10 carpetas traen `README.es.md` y `README.md`, así que instrucciones, pistas y ejemplos están completos en los dos idiomas. El código, los nombres de las funciones y los mensajes de las pruebas siguen en inglés, igual que en cualquier proyecto real.
+
+
+## 📚 Tutoriales relacionados
-1. [Alejandro Sanchez (alesanchezr)](https://github.com/alesanchezr), contribución: (programador) 💻, (idea) 🤔, (build-tests) ⚠️, (pull-request-review) 👀, (build-tutorial) ✅, (documentación) 📖
+Si quieres seguir practicando Python con el mismo formato interactivo y autocorregido:
-2. [Paolo (plucodev)](https://github.com/plucodev), contribución: (bug reports) 🐛, (programador) 💻, (traducción) 🌎
+1. [Aprende Python Interactivamente (principiante)](https://4geeks.com/es/interactive-exercise/python-beginner-exercises-es) — variables, condicionales y lo básico previo a este tutorial.
+2. [Aprende listas y bucles de Python](https://4geeks.com/es/interactive-exercise/python-loops-lists-exercises-es) — el paso natural después de las funciones.
+3. [Aprende Programación Orientada a Objetos con Python](https://4geeks.com/es/interactive-exercise/aprende-programacion-orientada-a-objetos-con-python) — clases, objetos y métodos.
+4. [Domina Python Practicando](https://4geeks.com/es/interactive-exercise/master-python-exercises-es) — una tanda más larga de retos para consolidarlo todo.
+5. [Trabajando con funciones en Python](https://4geeks.com/lesson/trabajando-con-funciones-en-python) — la lección escrita que hay detrás de estos ejercicios.
-3. [Marco Gómez (marcogonzalo)](https://github.com/marcogonzalo), contribution: (bug reports) 🐛, (traducción) 🌎
+## 🚀 ¿Cómo empezar?
-Este proyecto sigue la especificación [all-contributors](https://github.com/kentcdodds/all-contributors).
+Lo más rápido es un clic: [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).
-¡Todas las contribuciones son bienvenidas!
+Cuando se abra VS Code, los ejercicios de LearnPack deberían arrancar solos. Si no lo hacen, escribe `learnpack start` en la terminal.
-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 [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).
+## 💻 Instalación local
+
+1. Instala [LearnPack](https://learnpack.co) y su plugin de Python. Antes necesitas Node.js 14+ y Python 3+.
+
+ ```bash
+ npm i -g @learnpack/learnpack@2.1.20 && learnpack plugins:install @learnpack/python@1.0.0
+ ```
+
+2. Clona o descarga este repositorio en tu entorno local.
+
+ ```bash
+ git clone https://github.com/4GeeksAcademy/python-functions-programming-exercises.git
+ cd python-functions-programming-exercises
+ ```
+
+3. Instala las dependencias de las pruebas y arranca el tutorial desde la raíz del proyecto.
+
+ ```bash
+ pip3 install pytest==6.2.5 pytest-testdox mock
+ learnpack start
+ ```
+
+Cuando termine la descarga verás una carpeta `exercises` con todos los ejercicios dentro.
+
+## 📝 ¿Cómo están organizados los ejercicios?
+
+Cada ejercicio corregido es una pequeña aplicación de Python con los mismos ficheros:
+
+1. **`app.py`** — el fichero que editas y el que ejecuta el ordenador.
+2. **`README.md`** y **`README.es.md`** — las instrucciones, las pistas y el vídeo, en los dos idiomas.
+3. **`test.py`** o **`tests.py`** — el script de corrección. No hace falta que lo abras, aunque leerlo es la forma más rápida de entender qué se te está pidiendo.
+4. **`solution.hide.py`** — una solución de referencia que LearnPack mantiene oculta mientras trabajas.
+
+## 🤝 Colaboradores
+
+Gracias a estas personas maravillosas ([emoji key](https://github.com/kentcdodds/all-contributors#emoji-key)):
+
+1. [Alejandro Sánchez (alesanchezr)](https://github.com/alesanchezr) — programador 💻, idea 🤔, build-tests ⚠️, pull-request-review 👀, build-tutorial ✅, documentación 📖.
+2. [Paolo (plucodev)](https://github.com/plucodev) — reporte de errores 🐛, programador 💻, traducción 🌎.
+3. [Marco Gómez (marcogonzalo)](https://github.com/marcogonzalo) — reporte de errores 🐛, traducción 🌎.
+
+Este proyecto sigue la especificación [all-contributors](https://github.com/kentcdodds/all-contributors). Toda contribución es bienvenida: si encuentras un error o una falta de ortografía, [abre un issue](https://github.com/learnpack/learnpack/issues/new) o manda un pull request. Consulta [todos los colaboradores](https://github.com/4GeeksAcademy/python-functions-programming-exercises/graphs/contributors).
+
+Este y otros muchos ejercicios los construyen los estudiantes del [Coding Bootcamp](https://4geeksacademy.com/es/coding-bootcamp) de 4Geeks Academy, con [Alejandro Sánchez](https://github.com/alesanchezr) y muchos otros colaboradores. Conoce más sobre nuestro [curso de programación desde cero](https://4geeksacademy.com/es/curso-de-programacion-desde-cero), el bootcamp de [Desarrollador Full Stack](https://4geeksacademy.com/es/coding-bootcamps/desarrollador-full-stack) o el de [Data Science y Machine Learning](https://4geeksacademy.com/es/coding-bootcamps/curso-datascience-machine-learning).
+