From 2b4391fa25fc41bb5b73a6a03524e807cf779b1c 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:15:00 +0200
Subject: [PATCH 1/2] docs(readme): rewrite for clarity, SEO and AI answer
engines
---
README.md | 190 ++++++++++++++++++++++++++++++++++++++++--------------
1 file changed, 142 insertions(+), 48 deletions(-)
diff --git a/README.md b/README.md
index 84b66013..f65f5489 100644
--- a/README.md
+++ b/README.md
@@ -1,87 +1,181 @@
-# 🐍 Python lists and loops tutorial exercises
+
-

+# Learn Python Loops and lists Interactively
-> By [@alesanchezr](https://twitter.com/alesanchezr) and [otros colaboradores](https://github.com/4GeeksAcademy/python-lists-loops-programming-exercises/graphs/contributors) at [4Geeks Academy](https://4geeksacademy.co/)
+[](https://4geeks.com/en/interactive-exercise/python-loops-lists-exercises)
+[](https://learnpack.co)
+[](https://codespaces.new/?repo=4GeeksAcademy/python-lists-loops-programming-exercises)
+🇪🇸 [Estas instrucciones también están disponibles en español](https://github.com/4GeeksAcademy/python-lists-loops-programming-exercises/blob/HEAD/README.es.md)
-
-[](https://breatheco.de)
-[](https://twitter.com/4geeksacademy)
+
+
+
+This tutorial contains **45 auto-graded Python exercises** about lists, loops, dictionaries and matrices, plus a welcome page, all inside one LearnPack package. Every exercise folder ships an `app.py`, a `test.py` and a reference `solution.hide.py`, and the whole package is graded by **131 individual pytest checks**. Estimated duration: **10 hours**, difficulty **easy**, Python 3. Instructions are available in English and Spanish, and 13 exercises include a video walkthrough.
-*Estas instrucciones [están disponibles en 🇪🇸 español](https://github.com/4GeeksAcademy/python-lists-loops-programming-exercises/blob/master/README.es.md) :es:*
+
+## 📋 About this tutorial
+
+- **Difficulty:** easy (beginner, no previous loop experience needed)
+- **Estimated duration:** 10 hours
+- **Technologies:** Python 3, pytest, LearnPack
+- **Exercises:** 45 auto-graded exercises + 1 welcome page
+- **Automatic grading:** yes — 131 pytest checks across 45 `test.py` files
+- **Video solutions:** 13 exercises embed a YouTube walkthrough
+- **Languages:** instructions in English and Spanish (`README.md` and `README.es.md` inside every exercise)
+## 🎯 What will you learn?
+
+- **Access and mutate lists by index**, where the first position is `0`: read the 3rd item with `my_list[2]`, replace a value, and print a specific position.
+- **All the ways of looping in Python**: `for item in my_list`, `for i in range(start, stop, step)` and `while`, including a countdown from `20` to `1` that ends with `LIFTOFF`.
+- **Accumulator patterns written by hand**: totals, averages, maximums and minimums built with a `for` loop and an auxiliary variable instead of `sum()` or `max()`.
+- **Transform lists with `map()`** across 7 exercises: converting Celsius to Fahrenheit, mapping a list with an already-defined function, printing the data type of every item with `type()`, and mapping a list of dictionaries.
+- **Remove elements with `filter()`** across 5 exercises: numbers greater than `10`, names that start with a given letter, completed tasks inside a list of dictionaries, and a final one that combines `filter()` with `map()` to build `` HTML tags.
+- **Work with dictionaries**: read and add keys, loop over keys and values, and count letter frequencies ignoring case and spaces.
+- **Build and read 2-dimensional lists (matrices)**: generate an N×N matrix of `1`s and analyse a parking-lot grid with a nested loop.
+
+## 👀 What will you build?
+
+The 45 exercises are small, self-contained programs that grow in difficulty. Some of the ones you will solve:
+
+- **`03` Flip list** — turn `[45, 67, 87, 23, 5, 32, 60]` into `[60, 32, 5, 23, 87, 67, 45]` by looping the list and appending each item into a new one.
+- **`07` Do While** — print every number from `20` down to `1` with a `while` loop, adding an exclamation mark to multiples of 5, and finish with `LIFTOFF`.
+- **`08.2` Divide and conquer** — a `sort_odd_even()` function that returns one single flat list with the odd numbers first and the even ones after.
+- **`09` Max integer** — a `max_integer()` function that receives a list and returns the biggest number using a `for` loop and an `if`.
+- **`12` Map a list** — convert a list of Celsius temperatures into `[28.4, 93.2, 132.8, 14.0]` inside a `map()` call.
+- **`13.4` Making HTML with filter and map** — combine both functions to output `['Red', 'Orange', 'Pink', 'Violet']`.
+- **`14.1` Letter counter** — count how many times each letter appears in a text and print a dictionary such as `{'h': 1, 'e': 1, 'l': 3, 'o': 2, ...}`.
+- **`15.2` Parking lot** — a `get_parking_lot()` function that receives a matrix and returns `total_slots`, `available_slots` and `occupied_slots`.
+- **`16` Techno Beats** — the final challenge: a `lyrics_generator()` function that turns `[0, 0, 1, 1, 1, 0]` into `Boom` and `Drop the bass` beats, adding `!!!Break the bass!!!` every time it finds three `1`s in a row.
+
+
+
+## 🎓 What do you need before starting?
+
+- **Python basics**: variables, `print()`, `if/else` and how to declare a function. If you have never written Python, start with [Learn Python Interactively (beginner)](https://4geeks.com/en/interactive-exercise/python-beginner-exercises) first.
+- **No installation** if you open the tutorial in GitHub Codespaces or Gitpod: the container already installs Python 3.10, LearnPack and pytest for you (the Codespaces dev container also adds Node.js 22).
+- **For a local setup**: Python 3, Node.js 14+ and npm, so you can install LearnPack and run `learnpack start`.
+- **Zero previous knowledge of loops**: exercise `01` is a plain `print("Hello World")` and the difficulty ramps up from there.
+
+## ✅ How does the automatic grading work?
+
+Each of the 45 exercises has a `test.py` file executed with pytest (version 6.2.5, with `pytest-testdox` for readable output). Together they contain 131 named checks, and they grade your work in three different ways:
+
+- **Console output**: 40 exercises capture what your program prints and compare it against the expected text, character by character, including line breaks.
+- **Function behaviour**: 9 exercises require a function with an exact name, and 4 of them (`09`, `12.6`, `15.1` and `15.2`) call that function with their own inputs and compare the **returned** value, so printing instead of returning is not enough.
+- **Source code inspection**: 39 exercises open your `app.py` and scan its text (some with a regular expression, some with a plain search) to make sure you actually used the construct being taught — `for`, `while`, `if`, `print`, `map`, `filter`, `type` or `import random`, depending on the exercise.
+
+Every exercise folder also contains `solution.hide.py` with a reference solution, so you can compare approaches once you have solved it yourself.
+
+> 💡 The tests are deliberately strict about output formatting. If your logic is right but a test still fails, compare your output with the "Expected result" block in the exercise instructions, space by space.
+
+## 💡 What mistakes should you avoid?
-Lists and loops are one of the most challenging topics to grasp when learning how to code. You will learn:
+- **Printing when the test expects a `return`.** In `16` Techno Beats the last lines of `app.py` already call `print(lyrics_generator([0,0,1,1,0,0,0]))`, so your function must return the string. If you print inside the function, the output is duplicated and the test fails.
+- **Ignoring the function parameter.** The `15.2` Parking lot test calls `get_parking_lot()` with its own matrices, not with the global `parking_state` variable. A function that reads the global list instead of its argument fails the second and third checks.
+- **Miscounting the parking-lot values.** In `15.2` a `0` is not a parking slot: only `1` (occupied) and `2` (available) count towards `total_slots`. For `[[1,1,1], [0,0,0], [1,1,2]]` the expected answer is `{'total_slots': 6, 'available_slots': 1, 'occupied_slots': 5}`.
+- **Replacing `map()` or `filter()` with a list comprehension.** The 12.x tests literally search for the text `map` inside your `app.py`, and the 13.x tests search for `filter`, so a comprehension that prints the right result is not enough. The same happens with `sum()` in `05` or `max()` in `09`: those tests require a `for` loop in your code.
+- **Leaving debugging `print()` calls behind.** In `05` Sum all items and `13.4` the test compares the *entire* console output with the expected string, so any extra line breaks the assertion.
+- **Printing the `map()` or `filter()` object instead of the list.** Wrap the result in `list()`; the expected output looks like `[23, 12, 35, 54, 21, 534, 23, 42]`, not ``.
+- **Off-by-one indexes.** Lists start at `0`, so the "3rd item" is `my_list[2]` and `thursday` in a week list lives at `my_list[4]`. Exercise `01.1` imports `my_list` from your file and asserts that position 4 is `None`, so do not rename or delete the variables that come predefined in `app.py`.
-+ All the possible ways to loop in Python.
+## ❓ Frequently asked questions
-+ Looping lists, tuples, dictionaries and other data structures.
+### Do I need to install anything to start?
-The entire tutorial is 👆 interactive, ✅ auto-graded, and has 📹 video tutorials.
+No. Opening the repository in GitHub Codespaces or Gitpod builds a container with Python 3.10, LearnPack and pytest already installed, and the exercises start on their own. Installing locally is optional and takes two commands.
-These exercises were built in collaboration, we need you! If you find any bugs or misspellings, please contribute and report them.
+### Do I need to know Python before starting these exercises?
+
+You need the very basics: variables, `print()`, `if/else` and function declarations. Lists, indexes, loops, `map()`, `filter()`, dictionaries and matrices are all explained from scratch inside the exercise instructions.
+
+### How long does it take to complete the 45 exercises?
+
+The package is estimated at 10 hours of work. The first exercises take a couple of minutes each, while the final ones (`15.2` Parking lot and `16` Techno Beats) require nested loops and auxiliary counters and can take considerably longer.
+
+### Can I solve the exercises with list comprehensions instead of `map()` and `filter()`?
+
+Not if you want the tests to pass. The seven `map()` exercises and the five `filter()` exercises inspect your source code and look for the corresponding function inside `app.py`. Once you have passed them, rewriting the solution as a comprehension is an excellent extra practice.
+
+### Why does my exercise fail if the console output looks correct?
+
+Because the assertions compare exact strings. A missing trailing space, a different number of decimals, single quotes instead of double quotes inside a printed list, or an extra debugging line are enough to fail. Copy the "Expected result" block from the instructions and compare it literally with your output.
+
+### Is this tutorial free, and can I reuse the code?
+
+Access to the exercises costs nothing and the solutions you write are yours to keep and reuse. The tutorial content itself is not open source: the [LICENSE](https://github.com/4GeeksAcademy/python-lists-loops-programming-exercises/blob/HEAD/LICENSE.md) reserves all intellectual property rights and does not allow republishing, selling or redistributing the material.
+## 📚 Related tutorials
-
-
-
+- [Learn Python Interactively (beginner)](https://4geeks.com/en/interactive-exercise/python-beginner-exercises) — the recommended step before this one.
+- [Learn Python Functions Interactively](https://4geeks.com/en/interactive-exercise/python-function-exercises) — parameters, return values and scope.
+- [Learn Object Oriented Programming with Python](https://4geeks.com/en/interactive-exercise/object-oriented-programing-with-python) — classes and objects.
+- [Master Python by practice (interactive)](https://4geeks.com/en/interactive-exercise/master-python-exercises) — a bigger challenge once loops feel natural.
-## One click installation (recommended):
+## 🚀 How to start
-You can open these exercises in just a few seconds by clicking: [Open in Codespaces](https://codespaces.new/?repo=4GeeksAcademy/python-lists-loops-programming-exercises) (recommended) or [Open in Gitpod](https://gitpod.io#https://github.com/4GeeksAcademy/python-lists-loops-programming-exercises).
+The fastest way is to open the repository in a ready-made cloud environment:
-> 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`
+1. Click [Open in Codespaces](https://codespaces.new/?repo=4GeeksAcademy/python-lists-loops-programming-exercises) (recommended) or [Open in Gitpod](https://gitpod.io#https://github.com/4GeeksAcademy/python-lists-loops-programming-exercises).
-## Local Installation
+2. Wait for the container to finish building. It installs Python 3.10, `pytest`, LearnPack and the LearnPack Python plugin (in Codespaces it also installs Node.js 22).
-Clone the repository in your local environment and follow the steps below:
+3. The LearnPack exercises should open automatically. If they do not, run this in the terminal:
-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
+ $ learnpack start
+ ```
-```bash
-$ npm i @learnpack/learnpack@2.1.20 -g && learnpack plugins:install @learnpack/python@1.0.0
-```
+There is also an intro video for the whole tutorial: [Python lists and loops introduction](https://www.youtube.com/watch?v=xMg9d0KsYAk).
-2. Clone or download this repository in your local environment.
+## 💻 Local installation
-```bash
-$ git clone https://github.com/4GeeksAcademy/python-lists-loops-programming-exercises.git
-$ cd python-lists-loops-programming-exercises
-```
+1. Install [LearnPack](https://learnpack.co) and its Python plugin (you need Node.js 14+ and Python 3):
-> Note: Once you finish downloading, you will find an "exercises" folder that contains all the exercises within.
+ ```bash
+ $ npm i @learnpack/learnpack@5.0.348 -g && learnpack plugins:install @learnpack/python@1.0.6
+ ```
-3. Start the tutorial/exercises by running the following command at the same level where your learn.json file is:
+2. Clone this repository and enter the folder:
-```bash
-$ pip3 install pytest==6.2.5 pytest-testdox mock
-$ learnpack start
-```
+ ```bash
+ $ git clone https://github.com/4GeeksAcademy/python-lists-loops-programming-exercises.git
+ $ cd python-lists-loops-programming-exercises
+ ```
-
+3. Install the testing dependencies and start the tutorial from the same folder that contains `learn.json`:
+
+ ```bash
+ $ pip3 install pytest==6.2.5 pytest-testdox mock
+ $ learnpack start
+ ```
+
+## 📝 How the exercises are organized
-## How are the exercises organized?
+Every exercise lives in its own folder inside `exercises/` and contains the same set of files:
-Each exercise is a small Python project containing the following files:
+1. **`app.py`** — the file you edit; it is the Python script that gets executed.
-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.
+2. **`README.md`** and **`README.es.md`** — the instructions in English and Spanish, sometimes with a linked video tutorial.
-> 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.
+3. **`test.py`** — the grading script. You do not need to open it, but reading it tells you exactly what is being checked.
-## Contributors
+4. **`solution.hide.py`** — the reference solution for that exercise.
-Thanks goes to these wonderful people ([emoji key](https://github.com/kentcdodds/all-contributors#emoji-key)):
+Found a bug or a typo? [Report it here](https://github.com/learnpack/learnpack/issues/new); these exercises are built collaboratively and every report helps.
-1. [Alejandro Sanchez (alesanchezr)](https://github.com/alesanchezr), contribution: (coder) 💻, (idea) 🤔, (build-tests) ⚠️, (pull-request-review) 👀, (build-tutorial) ✅, (documentation) 📖
+## 🤝 Contributors
-2. [Paolo (plucodev)](https://github.com/plucodev), contribution: (bug reports) 🐛, (coder) 💻, (translation) 🌎
+Thanks to these wonderful people ([emoji key](https://github.com/kentcdodds/all-contributors#emoji-key)):
-This project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification. Contributions of any kind are welcome!
+1. [Alejandro Sánchez (alesanchezr)](https://github.com/alesanchezr) — (coder) 💻, (idea) 🤔, (build-tests) ⚠️, (pull-request-review) 👀, (build-tutorial) ✅, (documentation) 📖
-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).
+2. [Paolo (plucodev)](https://github.com/plucodev) — (bug reports) 🐛, (coder) 💻, (translation) 🌎
+
+See the full list of [contributors](https://github.com/4GeeksAcademy/python-lists-loops-programming-exercises/graphs/contributors). 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](https://4geeks.com/en/coding-bootcamp) coding bootcamp. Learn more about the [Full Stack Developer career program](https://4geeks.com/en/career-programs/full-stack) and the [Data Science and Machine Learning career program](https://4geeks.com/en/career-programs/data-science-ml).
+
From 3fc30d9fc1664bf3bdafa774862ca4fadc686291 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:15:02 +0200
Subject: [PATCH 2/2] docs(readme): rewrite for clarity, SEO and AI answer
engines
---
README.es.md | 187 ++++++++++++++++++++++++++++++++++++++++-----------
1 file changed, 148 insertions(+), 39 deletions(-)
diff --git a/README.es.md b/README.es.md
index 5957e943..20dd1607 100644
--- a/README.es.md
+++ b/README.es.md
@@ -1,72 +1,181 @@
-# 🐍 Ejercicios de looping en listas y tuplas de Python
+
-

+# Aprende listas y bucles de Python Interactivamente
-> Por [@alesanchezr](https://twitter.com/alesanchezr) y [otros colaboradores](https://github.com/4GeeksAcademy/python-lists-loops-programming-exercises/graphs/contributors) en [4Geeks Academy](https://4geeksacademy.co/)
+[](https://4geeks.com/es/interactive-exercise/python-loops-lists-exercises-es)
+[](https://learnpack.co)
+[](https://codespaces.new/?repo=4GeeksAcademy/python-lists-loops-programming-exercises)
+🇬🇧 [These instructions are also available in English](https://github.com/4GeeksAcademy/python-lists-loops-programming-exercises/blob/HEAD/README.md)
+
+
+
+
+Este tutorial reúne **45 ejercicios de Python autocorregidos** sobre listas, bucles, diccionarios y matrices, más una página de bienvenida, dentro de un único paquete LearnPack. Cada ejercicio incluye su `app.py`, su `test.py` y una solución de referencia en `solution.hide.py`, y todo el paquete se corrige con **131 comprobaciones de pytest**. Duración estimada: **10 horas**, dificultad **fácil**, Python 3. Las instrucciones están en español e inglés y 13 ejercicios traen vídeo explicativo.
+
+
+## 📋 Sobre este tutorial
+
+- **Dificultad:** fácil (para principiantes, no hace falta saber nada de bucles)
+- **Duración estimada:** 10 horas
+- **Tecnologías:** Python 3, pytest, LearnPack
+- **Ejercicios:** 45 ejercicios autocorregidos + 1 página de bienvenida
+- **Corrección automática:** sí — 131 comprobaciones de pytest repartidas en 45 archivos `test.py`
+- **Vídeo soluciones:** 13 ejercicios enlazan un vídeo de YouTube
+- **Idiomas:** instrucciones en español e inglés (`README.es.md` y `README.md` dentro de cada ejercicio)
-Las listas y los bucles son uno de los temas más desafiantes de comprender al aprender a programar. Aprenderás lo siguiente:
+## 🎯 ¿Qué vas a aprender?
+
+- **A acceder y modificar listas por índice**, sabiendo que la primera posición es la `0`: leer el tercer elemento con `mi_lista[2]`, sustituir un valor e imprimir una posición concreta.
+- **Todas las formas de iterar en Python**: `for elemento in mi_lista`, `for i in range(inicio, fin, paso)` y `while`, incluida una cuenta atrás de `20` a `1` que termina con `LIFTOFF`.
+- **Los patrones de acumulador escritos a mano**: totales, medias, máximos y mínimos construidos con un bucle `for` y una variable auxiliar en lugar de `sum()` o `max()`.
+- **A transformar listas con `map()`** en 7 ejercicios: pasar de grados Celsius a Fahrenheit, mapear una lista con una función ya definida, imprimir el tipo de dato de cada elemento con `type()` y mapear una lista de diccionarios.
+- **A descartar elementos con `filter()`** en 5 ejercicios: números mayores que `10`, nombres que empiezan por una letra concreta, tareas ya completadas dentro de una lista de diccionarios y un último ejercicio que combina `filter()` con `map()` para construir etiquetas `` de HTML.
+- **A manejar diccionarios**: leer y añadir claves, recorrer claves y valores, y contar cuántas veces se repite cada letra ignorando mayúsculas y espacios.
+- **A construir y leer listas de dos dimensiones (matrices)**: generar una matriz de `1` de N×N y analizar la cuadrícula de un aparcamiento con bucles anidados.
+
+## 👀 ¿Qué vas a construir?
+
+Los 45 ejercicios son programas pequeños e independientes que van subiendo de dificultad. Algunos de los que vas a resolver:
+
+- **`03` Flip list** — convertir `[45, 67, 87, 23, 5, 32, 60]` en `[60, 32, 5, 23, 87, 67, 45]` recorriendo la lista y añadiendo cada elemento a otra nueva.
+- **`07` Do While** — imprimir con un `while` los números del `20` al `1`, añadiendo un signo de exclamación a los múltiplos de 5 y terminando con `LIFTOFF`.
+- **`08.2` Divide and conquer** — una función `sort_odd_even()` que devuelve una sola lista plana con los impares primero y los pares después.
+- **`09` Max integer** — una función `max_integer()` que recibe una lista y devuelve el número más grande usando un `for` y un `if`.
+- **`12` Map a list** — convertir una lista de temperaturas en Celsius en `[28.4, 93.2, 132.8, 14.0]` dentro de un `map()`.
+- **`13.4` Making HTML with filter and map** — combinar las dos funciones para obtener `['Red', 'Orange', 'Pink', 'Violet']`.
+- **`14.1` Letter counter** — contar cuántas veces aparece cada letra de un texto e imprimir un diccionario del estilo `{'h': 1, 'e': 1, 'l': 3, 'o': 2, ...}`.
+- **`15.2` Parking lot** — una función `get_parking_lot()` que recibe una matriz y devuelve `total_slots`, `available_slots` y `occupied_slots`.
+- **`16` Techno Beats** — el reto final: una función `lyrics_generator()` que convierte `[0, 0, 1, 1, 1, 0]` en una letra de `Boom` y `Drop the bass`, añadiendo `!!!Break the bass!!!` cada vez que encuentra tres `1` seguidos.
+
+
+
+## 🎓 ¿Qué necesitas saber antes de empezar?
+
+- **Lo básico de Python**: variables, `print()`, `if/else` y cómo declarar una función. Si nunca has escrito Python, empieza por [Aprende Python Interactivamente (Principiante)](https://4geeks.com/es/interactive-exercise/python-beginner-exercises-es).
+- **Nada que instalar** si abres el tutorial en GitHub Codespaces o Gitpod: el contenedor ya trae Python 3.10, LearnPack y pytest listos (el contenedor de Codespaces añade además Node.js 22).
+- **Para trabajar en local**: Python 3, Node.js 14+ y npm, para poder instalar LearnPack y ejecutar `learnpack start`.
+- **Cero experiencia con bucles**: el ejercicio `01` es un simple `print("Hello World")` y a partir de ahí la dificultad sube poco a poco.
+
+## ✅ ¿Cómo funciona la corrección automática?
+
+Cada uno de los 45 ejercicios tiene su archivo `test.py`, que se ejecuta con pytest (versión 6.2.5, junto a `pytest-testdox` para leer los resultados con claridad). Entre todos suman 131 comprobaciones con nombre y revisan tu trabajo de tres maneras distintas:
+
+- **Salida por consola**: 40 ejercicios capturan lo que imprime tu programa y lo comparan con el texto esperado carácter a carácter, saltos de línea incluidos.
+- **Comportamiento de la función**: 9 ejercicios exigen una función con un nombre exacto y 4 de ellos (`09`, `12.6`, `15.1` y `15.2`) la llaman con sus propios datos y comparan el valor **devuelto**, así que imprimir no basta.
+- **Revisión del código fuente**: 39 ejercicios abren tu `app.py` y rastrean su texto (unos con una expresión regular, otros con una búsqueda simple) para asegurarse de que usaste la construcción que se está enseñando: `for`, `while`, `if`, `print`, `map`, `filter`, `type` o `import random`, según el caso.
+
+Además, cada carpeta de ejercicio incluye un `solution.hide.py` con una solución de referencia que puedes comparar con la tuya una vez lo hayas resuelto por tu cuenta.
+
+> 💡 Los tests son muy estrictos con el formato de la salida. Si tu lógica es correcta y aun así falla, compara tu resultado con el bloque «Resultado esperado» de las instrucciones, espacio por espacio.
+
+## 💡 ¿Qué errores conviene evitar?
+
+- **Imprimir cuando el test espera un `return`.** En `16` Techno Beats las últimas líneas de `app.py` ya hacen `print(lyrics_generator([0,0,1,1,0,0,0]))`, así que tu función tiene que devolver la cadena. Si imprimes dentro de la función, la salida se duplica y el test falla.
+- **Olvidarte del parámetro de la función.** El test de `15.2` Parking lot llama a `get_parking_lot()` con sus propias matrices, no con la variable global `parking_state`. Una función que lea la lista global en vez de su argumento no pasa la segunda ni la tercera comprobación.
+- **Contar mal las plazas del aparcamiento.** En `15.2` un `0` no es una plaza: solo el `1` (ocupada) y el `2` (libre) suman en `total_slots`. Para `[[1,1,1], [0,0,0], [1,1,2]]` la respuesta esperada es `{'total_slots': 6, 'available_slots': 1, 'occupied_slots': 5}`.
+- **Sustituir `map()` o `filter()` por una comprensión de lista.** Los tests de los ejercicios 12.x buscan literalmente el texto `map` dentro de tu `app.py`, y los de 13.x buscan `filter`, así que una comprensión que imprima el resultado correcto no basta. Pasa lo mismo con `sum()` en `05` o `max()` en `09`: esos tests exigen que haya un bucle `for` en tu código.
+- **Dejar `print()` de depuración por el camino.** En `05` Sum all items y en `13.4` el test compara la salida *completa* de la consola con la cadena esperada, así que cualquier línea de más rompe la comprobación.
+- **Imprimir el objeto `map()` o `filter()` en lugar de la lista.** Envuélvelo en `list()`: se espera algo como `[23, 12, 35, 54, 21, 534, 23, 42]`, no ``.
+- **Equivocarte de índice por uno.** Las listas empiezan en `0`, así que el «tercer elemento» es `mi_lista[2]` y `thursday`, en una lista con los días de la semana, está en `mi_lista[4]`. El test de `01.1` importa `my_list` desde tu archivo y comprueba que la posición 4 valga `None`, o sea que no renombres ni borres las variables que ya vienen en `app.py`.
-+ Todas las formas posibles de realizar bucles en Python.
+## ❓ Preguntas frecuentes
-+ Iterar sobre listas, tuplas, diccionarios y otras estructuras de datos.
+### ¿Necesito instalar algo para empezar?
-Estos ejercicios son colaborativos, ¡te necesitamos! Si encuentras algún error o falta de ortografía, por favor contribuye y repórtalo.
+No. Al abrir el repositorio en GitHub Codespaces o en Gitpod se crea un contenedor que ya trae Python 3.10, LearnPack y pytest instalados, y los ejercicios arrancan solos. La instalación local es opcional y son dos comandos.
+
+### ¿Hace falta saber Python antes de empezar?
+
+Solo lo mínimo: variables, `print()`, `if/else` y cómo declarar una función. Las listas, los índices, los bucles, `map()`, `filter()`, los diccionarios y las matrices se explican desde cero en las propias instrucciones de cada ejercicio.
+
+### ¿Cuánto se tarda en terminar los 45 ejercicios?
+
+El paquete está estimado en 10 horas. Los primeros ejercicios se resuelven en un par de minutos, mientras que los últimos (`15.2` Parking lot y `16` Techno Beats) requieren bucles anidados y variables auxiliares, y pueden llevar bastante más tiempo.
+
+### ¿Puedo resolver los ejercicios con comprensiones de lista en vez de `map()` y `filter()`?
+
+No si quieres que los tests pasen. Los siete ejercicios de `map()` y los cinco de `filter()` revisan tu código fuente y buscan la función correspondiente dentro de `app.py`. Una vez aprobados, reescribir la solución con una comprensión es un ejercicio extra buenísimo.
+
+### ¿Por qué falla mi ejercicio si la salida de la consola se ve bien?
+
+Porque las comprobaciones comparan cadenas exactas. Un espacio final que falta, un decimal de más, comillas simples en lugar de dobles dentro de una lista impresa o una línea de depuración sobrante bastan para fallar. Copia el bloque «Resultado esperado» de las instrucciones y compáralo literalmente con tu salida.
+
+### ¿El tutorial es gratis? ¿Puedo reutilizar el código?
+
+Acceder a los ejercicios no cuesta nada y el código que escribas es tuyo: puedes guardarlo y reutilizarlo. El contenido del tutorial, en cambio, no es de código abierto: la [licencia](https://github.com/4GeeksAcademy/python-lists-loops-programming-exercises/blob/HEAD/LICENSE.md) reserva todos los derechos de propiedad intelectual y no permite republicar, vender ni redistribuir el material.
+## 📚 Tutoriales relacionados
-## Instalación en un clic (recomendado)
+- [Aprende Python Interactivamente (Principiante)](https://4geeks.com/es/interactive-exercise/python-beginner-exercises-es) — el paso recomendado antes de este.
+- [Aprende las funciones de Python Interactivamente](https://4geeks.com/es/interactive-exercise/python-function-exercises-es) — parámetros, valores de retorno y ámbito.
+- [Aprende Programación Orientada a Objetos con Python](https://4geeks.com/es/interactive-exercise/aprende-programacion-orientada-a-objetos-con-python) — clases y objetos.
+- [Domina Python Practicando (interactivo)](https://4geeks.com/es/interactive-exercise/master-python-exercises-es) — el siguiente reto cuando los bucles ya te salgan solos.
-Puedes empezar estos ejercicios en pocos segundos haciendo clic en: [Abrir en Codespaces](https://codespaces.new/?repo=4GeeksAcademy/python-lists-loops-programming-exercises) (recomendado) o [Abrir en Gitpod](https://gitpod.io#https://github.com/4GeeksAcademy/python-lists-loops-programming-exercises).
+## 🚀 Cómo empezar
-> 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`
+Lo más rápido es abrir el repositorio en un entorno en la nube ya preparado:
-## Instalación local:
+1. Haz clic en [Abrir en Codespaces](https://codespaces.new/?repo=4GeeksAcademy/python-lists-loops-programming-exercises) (recomendado) o en [Abrir en Gitpod](https://gitpod.io#https://github.com/4GeeksAcademy/python-lists-loops-programming-exercises).
-1. Asegúrate de instalar [LearnPack](https://learnpack.co), node.js version 14+ y Python version 3+. Este es el comando para instalar LearnPack:
+2. Espera a que el contenedor termine de construirse: instala Python 3.10, `pytest`, LearnPack y el plugin de Python de LearnPack (en Codespaces instala además Node.js 22).
-```bash
-$ npm i @learnpack/learnpack@2.1.20 -g && learnpack plugins:install @learnpack/python@1.0.0
-```
+3. Los ejercicios de LearnPack deberían abrirse automáticamente. Si no lo hacen, escribe esto en la terminal:
-2. Clona o descarga este repositorio en tu ambiente local.
+ ```bash
+ $ learnpack start
+ ```
-```bash
-$ git clone https://github.com/4GeeksAcademy/python-lists-loops-programming-exercises.git
-$ cd python-lists-loops-programming-exercises
-```
+También hay un vídeo de introducción a todo el tutorial: [Introducción a listas y bucles en Python](https://www.youtube.com/watch?v=xMg9d0KsYAk).
-> Nota: Una vez que termine de descargar, encontrarás la carpeta "exercises" que contiene todos los ejercicios.
+## 💻 Instalación local
-3. Comienza con los ejercicios ejecutando los siguientes comandos en el mismo nivel que tu archivo learn.json:
+1. Instala [LearnPack](https://learnpack.co) y su plugin de Python (necesitas Node.js 14+ y Python 3):
-```bash
-$ pip3 install pytest==6.2.5 pytest-testdox mock
-$ learnpack start
-```
+ ```bash
+ $ npm i @learnpack/learnpack@5.0.348 -g && learnpack plugins:install @learnpack/python@1.0.6
+ ```
-
+2. Clona este repositorio y entra en la carpeta:
+
+ ```bash
+ $ git clone https://github.com/4GeeksAcademy/python-lists-loops-programming-exercises.git
+ $ cd python-lists-loops-programming-exercises
+ ```
+
+3. Instala las dependencias de los tests y arranca el tutorial desde la misma carpeta donde está `learn.json`:
+
+ ```bash
+ $ pip3 install pytest==6.2.5 pytest-testdox mock
+ $ learnpack start
+ ```
+
+## 📝 Cómo están organizados los ejercicios
-## ¿Cómo están organizados los ejercicios?
+Cada ejercicio vive en su propia carpeta dentro de `exercises/` y contiene siempre los mismos archivos:
-Cada ejercicio es un pequeño proyecto en Python que contiene los siguientes archivos:
+1. **`app.py`** — el archivo que editas; es el script de Python que se ejecuta.
-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.
+2. **`README.md`** y **`README.es.md`** — las instrucciones en inglés y en español, a veces con un vídeo tutorial enlazado.
-> 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.
+3. **`test.py`** — el script de corrección. No hace falta que lo abras, pero leerlo te dice exactamente qué se está comprobando.
+
+4. **`solution.hide.py`** — la solución de referencia de ese ejercicio.
+
+¿Has encontrado un error o una errata? [Repórtalo aquí](https://github.com/learnpack/learnpack/issues/new); estos ejercicios se construyen entre todos y cada aviso ayuda.
+
+## 🤝 Colaboradores
-## 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 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), contribución: (bug reports) 🐛, (programador), (traducción) 🌎
+2. [Paolo (plucodev)](https://github.com/plucodev) — (bug reports) 🐛, (programador) 💻, (traducción) 🌎
-Este proyecto sigue la especificación [all-contributors](https://github.com/kentcdodds/all-contributors). ¡Todas las contribuciones son bienvenidas!
+Consulta la lista completa de [colaboradores](https://github.com/4GeeksAcademy/python-lists-loops-programming-exercises/graphs/contributors). Este proyecto sigue la especificación [all-contributors](https://github.com/kentcdodds/all-contributors) y toda contribución es bienvenida.
-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).
+Estos y muchos otros ejercicios los construyen los estudiantes del bootcamp de [4Geeks Academy](https://4geeks.com/es/blog/aprender-a-programar/aprender-a-programar-desde-cero). Conoce más sobre el [Bootcamp de Desarrollador Full Stack](https://4geeks.com/es/programas-de-carrera/desarrollo-full-stack) y el [Bootcamp de Data Science y Machine Learning](https://4geeks.com/es/programas-de-carrera/ciencia-de-datos-ml).
+