From 144ac7162becb8e016fb2dd0ea31039034281976 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 15 Nov 2023 20:34:19 +0100 Subject: [PATCH 01/17] Update README.md --- exercises/00-Welcome/README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/exercises/00-Welcome/README.md b/exercises/00-Welcome/README.md index 51b7b914..fe1b90c6 100644 --- a/exercises/00-Welcome/README.md +++ b/exercises/00-Welcome/README.md @@ -8,7 +8,7 @@ We are very excited to have you here! 🎉 😂 ## 💬 Fundamentals: -During this course you will be learning the following concepts: +During this course, you will be learning the following concepts: 1. How to create and call functions. @@ -24,9 +24,9 @@ Please click on the `Next →` button on the top right to proceed to the first c ## Useful Readings: -+ [https://www.w3schools.com/python/python_intro.asp#:~:text=Python%20has%20a%20simple%20syntax,prototyping%20can%20be%20very%20quick.](https://www.w3schools.com/python/python_intro.asp#:~:text=Python%20has%20a%20simple%20syntax,prototyping%20can%20be%20very%20quick.) ++ https://www.w3schools.com/python/python_intro.asp -+ [https://www.python.org/doc/essays/blurb/](https://www.python.org/doc/essays/blurb/) ++ https://www.python.org/doc/essays/blurb/ ## Useful Video: @@ -36,11 +36,11 @@ Please click on the `Next →` button on the top right to proceed to the first c 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) :computer: (idea) 🤔, (build-tests) :warning:, (pull-request-review) :eyes: (build-tutorial) :white_check_mark: (documentation) :book: +1. [Alejandro Sanchez (alesanchezr)](https://github.com/alesanchezr), contribution: (coder) 💻, (idea) 🤔, (build-tests) ⚠️, (pull-request-review) 🤓, (build-tutorial) ✅, (documentation) 📖 -2. [Paolo Lucano (plucodev)](https://github.com/plucodev), contribution: (coder), (build-tests) :warning: +2. [Paolo Lucano (plucodev)](https://github.com/plucodev), contribution: (coder) 💻, (build-tests) ⚠️ -3. [Marco Gómez (marcogonzalo)](https://github.com/marcogonzalo), contribution: (translator) :earth_africa: +3. [Marco Gómez (marcogonzalo)](https://github.com/marcogonzalo), contribution: (translator) 🌎 This project follows these specifications: [all-contributors](https://github.com/kentcdodds/all-contributors) From 5433a861d7759aa8b45b247657022379e99c6877 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 15 Nov 2023 20:35:16 +0100 Subject: [PATCH 02/17] Update README.md --- exercises/00-Welcome/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/00-Welcome/README.md b/exercises/00-Welcome/README.md index fe1b90c6..98098f37 100644 --- a/exercises/00-Welcome/README.md +++ b/exercises/00-Welcome/README.md @@ -2,7 +2,7 @@ intro: "https://www.youtube.com/watch?v=amyDNhZwGJQ" --- -# Welcome to Python Beginner Course! +# Welcome to the Python Beginner Course! We are very excited to have you here! 🎉 😂 From 0d93e51c1ea4bf8c5be30551f3117ebaa6183e8a Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 15 Nov 2023 20:37:33 +0100 Subject: [PATCH 03/17] Update README.md --- exercises/00-Welcome/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/exercises/00-Welcome/README.md b/exercises/00-Welcome/README.md index 98098f37..cd7885ac 100644 --- a/exercises/00-Welcome/README.md +++ b/exercises/00-Welcome/README.md @@ -24,9 +24,9 @@ Please click on the `Next →` button on the top right to proceed to the first c ## Useful Readings: -+ https://www.w3schools.com/python/python_intro.asp ++ [https://www.w3schools.com/python/python_intro.asp](https://www.w3schools.com/python/python_intro.asp) -+ https://www.python.org/doc/essays/blurb/ ++ [https://www.python.org/doc/essays/blurb/](https://www.python.org/doc/essays/blurb/) ## Useful Video: From c421c20ef920a32486449f42ad9faac1035ecb24 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 15 Nov 2023 20:39:09 +0100 Subject: [PATCH 04/17] Update README.es.md --- exercises/00-Welcome/README.es.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/exercises/00-Welcome/README.es.md b/exercises/00-Welcome/README.es.md index 8cd1f8b1..7b1b9591 100644 --- a/exercises/00-Welcome/README.es.md +++ b/exercises/00-Welcome/README.es.md @@ -1,4 +1,4 @@ -# ¡Bienvenido al curso inicial de Python! +# Welcome to the Python Beginner Course! ¡Estamos muy entusiasmados por tenerte aquí! 🎉 😂 @@ -12,7 +12,7 @@ Durante este curso aprenderás los siguientes conceptos: 3. Cómo concatenar strings. -4. Cómo usar bucles(loops) y declaraciones if. +4. Cómo usar bucles (loops) y declaraciones if...else. 5. Cómo combinar y usar todos estos conceptos de diferentes formas. @@ -28,16 +28,15 @@ Por favor, haz clic en el botón `Next →` arriba a la derecha para dirigirte a + [https://youtu.be/lc5JJTQa4r8](https://youtu.be/lc5JJTQa4r8) - ## Colaboradores: Gracias a estas maravillosas personas ([emoji key](https://github.com/kentcdodds/all-contributors#emoji-key)): -1. [Alejandro Sánchez (alesanchezr)](https://github.com/alesanchezr), contribución: (programador) :computer: (idea) 🤔, (build-tests) :warning:, (pull-request-review) :eyes: (build-tutorial) :white_check_mark: (documentación) :book: +1. [Alejandro Sánchez (alesanchezr)](https://github.com/alesanchezr), contribución: (programador) 💻, (idea) 🤔, (build-tests) ⚠️, (pull-request-review) 🤓, (build-tutorial) ✅, (documentación) 📖 -2. [Paolo Lucano (plucodev)](https://github.com/plucodev), contribución: (programador) :computer:, (build-tests) :warning: +2. [Paolo Lucano (plucodev)](https://github.com/plucodev), contribución: (programador) 💻, (build-tests) ⚠️ -3. [Marco Gómez (marcogonzalo)](https://github.com/marcogonzalo), contribución: (traducción) :earth_africa: +3. [Marco Gómez (marcogonzalo)](https://github.com/marcogonzalo), contribución: (traducción) 🌎 Este proyecto sigue las especificaciones: [all-contributors](https://github.com/kentcdodds/all-contributors). From 8092901d3cdd7dc11041768b8dd31573274dbee3 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 15 Nov 2023 20:45:06 +0100 Subject: [PATCH 05/17] Update README.md --- exercises/01-Console/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/exercises/01-Console/README.md b/exercises/01-Console/README.md index 7483c0e8..79c30923 100644 --- a/exercises/01-Console/README.md +++ b/exercises/01-Console/README.md @@ -6,9 +6,9 @@ tutorial: "https://www.youtube.com/watch?v=2sV-2frucUs" 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 programming language has a console, as it was the only way to interact with the users at the beginning (before Windows or MacOS arrived). +Every programming language has a console, as it was the only way to interact with the users at the beginning (before Windows or macOS arrived). -Today, printing in the console is used mostly as a monitoring and debugging 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: @@ -18,13 +18,13 @@ print("How are you?") ## 📝 Instructions: -1. Use **print** to print `Hello World!` on the console. +1. Use `print()` to print `Hello World!` on the console. ## 💡 Hints: + Remember, to run the code and see the output on the console, click on the box icon in the top left of the screen: -https://i.imgur.com/w6u4aDd.png +![The compile button](https://i.imgur.com/w6u4aDd.png) + Feel free to try other things as well. From b150ca724bf43a6e5a792b9bcf5822da06e338f3 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 15 Nov 2023 20:48:16 +0100 Subject: [PATCH 06/17] Update README.es.md --- exercises/01-Console/README.es.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/exercises/01-Console/README.es.md b/exercises/01-Console/README.es.md index 0b009142..026aed8e 100644 --- a/exercises/01-Console/README.es.md +++ b/exercises/01-Console/README.es.md @@ -2,7 +2,7 @@ En Python, usamos **print** para que el computador escriba cualquier cosa que queramos (el contenido de una variable, una string dado, etc.) en algo llamado "la consola". -Cada lenguaje de programación tiene una consola, ya que al principio era la única forma de interactuar con los usuarios (antes de que llegaran Windows, Linux o MacOS). +Cada lenguaje de programación tiene una 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. @@ -14,12 +14,12 @@ print("Un texto en la consola") ## 📝 Instrucciones: -1. usa **print** para escribir `Hello World!` en la consola. +1. usa `print()` para escribir `Hello World!` en la consola. ## 💡 Pistas: + Recuerda, para ejecutar el código y ver el resultado en la consola, haz clic en el ícono de caja en la esquina superior izquierda de la pantalla: -https://i.imgur.com/w6u4aDd.png +![Botón de compilar](https://i.imgur.com/w6u4aDd.png) + Siéntete libre de intentar otras cosas también. From a9c16836bcf099d737ff63f105c57c09bfca00c5 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 15 Nov 2023 20:54:13 +0100 Subject: [PATCH 07/17] Update README.md --- exercises/01-Console/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/01-Console/README.md b/exercises/01-Console/README.md index 79c30923..8ccdcda4 100644 --- a/exercises/01-Console/README.md +++ b/exercises/01-Console/README.md @@ -6,7 +6,7 @@ tutorial: "https://www.youtube.com/watch?v=2sV-2frucUs" 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 programming language has a console, as it was the only way to interact with the users at the beginning (before Windows or macOS arrived). +Every programming language has a 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 mostly used as a monitoring and debugging tool, ideal for leaving a trace of the content of variables during the program's execution. From 922004436df46a71ec06d3575605185db6f1def7 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 15 Nov 2023 21:07:50 +0100 Subject: [PATCH 08/17] Update README.md --- exercises/02-Declare-Variables/README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/exercises/02-Declare-Variables/README.md b/exercises/02-Declare-Variables/README.md index 8d0bd5a6..55a5d4fb 100644 --- a/exercises/02-Declare-Variables/README.md +++ b/exercises/02-Declare-Variables/README.md @@ -18,7 +18,8 @@ In this example, `name` is the variable, acting like a box to store the value `" 2. Then, print its value on the console using `print(name)`. -## 💡 Hint: +## 💡 Hints: + The name of the variable can be whatever you want, but the value inside has to be the string "Yellow". -+ If you need further explanation on what **strings** are and how they work in python, you can watch this clip: https://youtube.com/clip/UgkxyQ_JLmgSUL4l25c8Ly7cCRvk1Gm-EchU (`ctrl + click` on the link to open the video) \ No newline at end of file + ++ If you need further explanation on what **strings** are and how they work in Python, you can watch this clip: https://youtube.com/clip/UgkxyQ_JLmgSUL4l25c8Ly7cCRvk1Gm-EchU (`ctrl + click` on the link to open the video) From c05b1fd494d5c358c876dbeaa9f8a1e9cf715c89 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 15 Nov 2023 21:13:23 +0100 Subject: [PATCH 09/17] Update README.es.md --- exercises/02-Declare-Variables/README.es.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/exercises/02-Declare-Variables/README.es.md b/exercises/02-Declare-Variables/README.es.md index 9954fc1c..eaacd6fa 100644 --- a/exercises/02-Declare-Variables/README.es.md +++ b/exercises/02-Declare-Variables/README.es.md @@ -6,7 +6,7 @@ En la programación, usamos variables como si fueran cajas (o contenedores) para name = "Daniel" ``` -En este ejemplo, `name` es la variable, actuando como una caja para almacenar el valor `"Daniel"`. Dentro de esta 'caja', estamos almacenando el valor `"Daniel"`, y podemos usar `name` para referirnos a este valor más tarde. Al nombrar tus variables, puedes elegir casi cualquier nombre, pero debe comenzar con una letra o un guión bajo (`_`). Es útil elegir un nombre que describa lo que hay dentro de la 'caja' para que puedas entender fácilmente lo que representa más adelante. +En este ejemplo, `name` es la variable, actuando como una caja para almacenar el valor `"Daniel"`. Dentro de esta 'caja', estamos almacenando el valor `"Daniel"`, y podemos usar `name` para referirnos a este valor más tarde. Al nombrar tus variables, puedes elegir casi cualquier nombre, pero debe comenzar con una letra o un guion bajo (`_`). Es útil elegir un nombre que describa lo que hay dentro de la 'caja' para que puedas entender fácilmente lo que representa más adelante. ## 📝 Instrucciones: @@ -14,8 +14,8 @@ En este ejemplo, `name` es la variable, actuando como una caja para almacenar el 2. Luego, imprime su valor en la consola usando `print(name)`. -## 💡 Pista: +## 💡 Pistas: + Puedes darle el nombre que quieras a la variable, pero su valor tiene que ser el texto "Yellow". -+ Si necesitas más explicación sobre qué son los **strings** y cómo funcionan en Python, puedes ver este clip: https://www.youtube.com/watch?v=yT0jixU3M2c&ab_channel=ProgramaResuelto (`ctrl + click` en el enlance para abrir el video) ++ Si necesitas más explicación sobre qué son los **strings** y cómo funcionan en Python, puedes ver este clip: https://www.youtube.com/watch?v=yT0jixU3M2c&ab_channel=ProgramaResuelto (`ctrl + click` en el enlace para abrir el video) From 9fcc946a30c03204166391a10e78400183c3cfd3 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 15 Nov 2023 21:28:06 +0100 Subject: [PATCH 10/17] Update test.py --- exercises/03-Print-Variables-In-The-Console/test.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/exercises/03-Print-Variables-In-The-Console/test.py b/exercises/03-Print-Variables-In-The-Console/test.py index 6dbe8c36..272f300d 100644 --- a/exercises/03-Print-Variables-In-The-Console/test.py +++ b/exercises/03-Print-Variables-In-The-Console/test.py @@ -8,12 +8,12 @@ import re path = os.path.dirname(os.path.abspath(__file__))+'/app.py' -@pytest.mark.it("Create a variable named 'color' with the string value red") +@pytest.mark.it('Create a variable named "color" with the string value "red"') def test_declare_variable(): result = app.color assert result == "red" -@pytest.mark.it('Print on the console the value of the variable ') +@pytest.mark.it('Print on the console the value of the variable') def test_for_printing_variable(): with open(path, 'r') as content_file: @@ -24,4 +24,4 @@ def test_for_printing_variable(): @pytest.mark.it('The printed value on the console should be "red"') def test_for_file_output(capsys): captured = buffer.getvalue() - assert "red\n" in captured \ No newline at end of file + assert "red\n" in captured From 1a678d29e416a7dbe0f54a7af58b456f9902271f Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 15 Nov 2023 21:28:46 +0100 Subject: [PATCH 11/17] Update README.md --- exercises/04-Multiply-Two-Values/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/exercises/04-Multiply-Two-Values/README.md b/exercises/04-Multiply-Two-Values/README.md index 3d50d029..582a19d9 100644 --- a/exercises/04-Multiply-Two-Values/README.md +++ b/exercises/04-Multiply-Two-Values/README.md @@ -6,7 +6,7 @@ tutorial: "https://www.youtube.com/watch?v=tATIrAWiLLU" Any programming language lets you do basic Math operations like multiplication, division, etc. -To multiply 2 values in python, you have to use the asterisk operator like this: +To multiply 2 values in Python, you have to use the asterisk operator like this: ```py resulting_value = 2 * 3 @@ -18,4 +18,4 @@ In this case, we stored the resulting value of the multiplication into a variabl 1. Please store the result of multiplying 2345 times 7323 in a variable called `variables_are_cool`. -2. Now print the result in the console. \ No newline at end of file +2. Now print the result in the console. From 7c7ee28d0a0ea83ebd23438718842c6523ae8f21 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 15 Nov 2023 21:30:59 +0100 Subject: [PATCH 12/17] Update test.py --- exercises/04-Multiply-Two-Values/test.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/exercises/04-Multiply-Two-Values/test.py b/exercises/04-Multiply-Two-Values/test.py index 5167a8b0..f18d4f72 100644 --- a/exercises/04-Multiply-Two-Values/test.py +++ b/exercises/04-Multiply-Two-Values/test.py @@ -15,12 +15,12 @@ def test_variable_exists(): except ImportError: raise ImportError("The variable 'variables_are_cool' should exist on app.py") -@pytest.mark.it('Variables_are_cool value should be like 2345 * 7323 ') +@pytest.mark.it('The value of variables_are_cool should be 2345 * 7323') def test_use_variable_name(): result = app.variables_are_cool == 17172435 assert result == True -@pytest.mark.it('Print on the console the variables_are_cool value ') +@pytest.mark.it('Print on the console the value of variables_are_cool') def test_for_file_output(capsys): captured = buffer.getvalue() assert '17172435\n' in captured From 75d86d3c9d05b82fa0cdbd4db04f1ab78c923a4b Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 15 Nov 2023 23:56:13 +0100 Subject: [PATCH 13/17] Update README.es.md --- .../03-Print-Variables-In-The-Console/README.es.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/exercises/03-Print-Variables-In-The-Console/README.es.md b/exercises/03-Print-Variables-In-The-Console/README.es.md index cc1abed7..5ce2ba7f 100644 --- a/exercises/03-Print-Variables-In-The-Console/README.es.md +++ b/exercises/03-Print-Variables-In-The-Console/README.es.md @@ -1,14 +1,15 @@ # `03` Print Variables in The Console -También puedes usar la función **print** para imprimir variables en la consola. Es una excelente forma de verificar su valor actual, así: +También puedes imprimir más de una variable en la misma función `print()` separando con una coma `,` las variables a imprimir. De esta manera: ```py -my_super_variable = 'hello' -print(my_super_variable) +my_variable = 'hello' +my_second_variable = "world" +print(my_variable, my_second_variable) # --> hello world ``` ## 📝 Instrucciones: -1. Declara una nueva variable llamada `color` y asígnale el valor `"red"`. +1. Declara dos nuevas variables llamadas `color` y `item` y asígnales el valor `"red"` y `marker` respectivamente. -2. Luego, imprime su valor en la consola (puede que tengas que desplazarte en la consola para poder verlo). +2. Luego, imprime sus valores en la consola (puede que tengas que desplazarte en la consola para poder verlo). From 49dbbc587c0d7b8315ea2e215fdc13c7fcfedc15 Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 15 Nov 2023 23:56:16 +0100 Subject: [PATCH 14/17] Update README.md --- .../03-Print-Variables-In-The-Console/README.md | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/exercises/03-Print-Variables-In-The-Console/README.md b/exercises/03-Print-Variables-In-The-Console/README.md index a2b28a89..9bb64e58 100644 --- a/exercises/03-Print-Variables-In-The-Console/README.md +++ b/exercises/03-Print-Variables-In-The-Console/README.md @@ -1,18 +1,15 @@ ---- -tutorial: "https://www.youtube.com/watch?v=Ki1LaUKhPgU" ---- +# `03` Print more Variables in the console -# `03` Print the Variables in the console - -You can also use the **print** function to print variables in the console. It's a great way to check their current value, like this: +You can also print more than one variable in the same `print()` function by separating the variables with a comma `,`. Like this: ```py -my_super_variable = 'hello' -print(my_super_variable) +my_variable = 'hello' +my_second_variable = "world" +print(my_variable, my_second_variable) # --> hello world ``` ## 📝 Instructions: -1. Declare a new variable called `color` and assign the value `"red"` to it. +1. Declare two new variables called `color` and `item`, and assign the value `"red"` and `"marker"` respectively to it. -2. Then, print its value on the console (you may have to scroll up in the terminal to see it!). +2. Then, print their values on the console (you may have to scroll up in the terminal to see it!). From e7b48b581f4c523eb8e40d7395c33a990e2f1fdd Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 15 Nov 2023 23:56:18 +0100 Subject: [PATCH 15/17] Update solution.hide.py --- exercises/03-Print-Variables-In-The-Console/solution.hide.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/exercises/03-Print-Variables-In-The-Console/solution.hide.py b/exercises/03-Print-Variables-In-The-Console/solution.hide.py index fe2615ac..06ac9503 100644 --- a/exercises/03-Print-Variables-In-The-Console/solution.hide.py +++ b/exercises/03-Print-Variables-In-The-Console/solution.hide.py @@ -1,4 +1,5 @@ # ✅ ↓ your code here ↓ ✅ color = "red" -print(color) \ No newline at end of file +item = "marker" +print(color, item) From 7991026fb4817b967a739acbcf55cef22901434f Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 15 Nov 2023 23:56:21 +0100 Subject: [PATCH 16/17] Update test.py --- .../03-Print-Variables-In-The-Console/test.py | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/exercises/03-Print-Variables-In-The-Console/test.py b/exercises/03-Print-Variables-In-The-Console/test.py index 272f300d..e3238524 100644 --- a/exercises/03-Print-Variables-In-The-Console/test.py +++ b/exercises/03-Print-Variables-In-The-Console/test.py @@ -5,23 +5,20 @@ import pytest import app import os -import re + path = os.path.dirname(os.path.abspath(__file__))+'/app.py' -@pytest.mark.it('Create a variable named "color" with the string value "red"') +@pytest.mark.it("Create a variable named 'color' with the string value 'red'") def test_declare_variable(): result = app.color assert result == "red" -@pytest.mark.it('Print on the console the value of the variable') -def test_for_printing_variable(): - - with open(path, 'r') as content_file: - content = content_file.read() - regex = re.compile(r"print\s*\(\s*color\s*\)") - assert bool(regex.search(content)) == True +@pytest.mark.it("Create a variable named 'item' with the string value 'marker'") +def test_declare_variable(): + result = app.item + assert result == "marker" -@pytest.mark.it('The printed value on the console should be "red"') +@pytest.mark.it('The printed value on the console should be "red marker"') def test_for_file_output(capsys): captured = buffer.getvalue() - assert "red\n" in captured + assert "red marker\n" in captured From d26adf3521b6134599e454db66be11310303c1da Mon Sep 17 00:00:00 2001 From: Jose Mora <109150320+josemoracard@users.noreply.github.com> Date: Wed, 15 Nov 2023 23:56:44 +0100 Subject: [PATCH 17/17] Update README.es.md --- exercises/03-Print-Variables-In-The-Console/README.es.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/03-Print-Variables-In-The-Console/README.es.md b/exercises/03-Print-Variables-In-The-Console/README.es.md index 5ce2ba7f..12b5a6fd 100644 --- a/exercises/03-Print-Variables-In-The-Console/README.es.md +++ b/exercises/03-Print-Variables-In-The-Console/README.es.md @@ -1,4 +1,4 @@ -# `03` Print Variables in The Console +# `03` Print more Variables in The Console También puedes imprimir más de una variable en la misma función `print()` separando con una coma `,` las variables a imprimir. De esta manera: