Skip to content

Commit edd518f

Browse files
authored
Merge pull request #92 from josemoracard/jose2-00-Welcome
exercises 00-welcome to 04-Multiply-Two-Values
2 parents 866fdc5 + d26adf3 commit edd518f

File tree

12 files changed

+52
-56
lines changed

12 files changed

+52
-56
lines changed

exercises/00-Welcome/README.es.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# ¡Bienvenido al curso inicial de Python!
1+
# Welcome to the Python Beginner Course!
22

33
¡Estamos muy entusiasmados por tenerte aquí! 🎉 😂
44

@@ -12,7 +12,7 @@ Durante este curso aprenderás los siguientes conceptos:
1212

1313
3. Cómo concatenar strings.
1414

15-
4. Cómo usar bucles(loops) y declaraciones if.
15+
4. Cómo usar bucles (loops) y declaraciones if...else.
1616

1717
5. Cómo combinar y usar todos estos conceptos de diferentes formas.
1818

@@ -28,16 +28,15 @@ Por favor, haz clic en el botón `Next →` arriba a la derecha para dirigirte a
2828

2929
+ [https://youtu.be/lc5JJTQa4r8](https://youtu.be/lc5JJTQa4r8)
3030

31-
3231
## Colaboradores:
3332

3433
Gracias a estas maravillosas personas ([emoji key](https://github.com/kentcdodds/all-contributors#emoji-key)):
3534

36-
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:
35+
1. [Alejandro Sánchez (alesanchezr)](https://github.com/alesanchezr), contribución: (programador) 💻, (idea) 🤔, (build-tests) ⚠️, (pull-request-review) 🤓, (build-tutorial) ✅, (documentación) 📖
3736

38-
2. [Paolo Lucano (plucodev)](https://github.com/plucodev), contribución: (programador) :computer:, (build-tests) :warning:
37+
2. [Paolo Lucano (plucodev)](https://github.com/plucodev), contribución: (programador) 💻, (build-tests) ⚠️
3938

40-
3. [Marco Gómez (marcogonzalo)](https://github.com/marcogonzalo), contribución: (traducción) :earth_africa:
39+
3. [Marco Gómez (marcogonzalo)](https://github.com/marcogonzalo), contribución: (traducción) 🌎
4140

4241
Este proyecto sigue las especificaciones: [all-contributors](https://github.com/kentcdodds/all-contributors).
4342

exercises/00-Welcome/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
intro: "https://www.youtube.com/watch?v=amyDNhZwGJQ"
33
---
44

5-
# Welcome to Python Beginner Course!
5+
# Welcome to the Python Beginner Course!
66

77
We are very excited to have you here! 🎉 😂
88

99
## 💬 Fundamentals:
1010

11-
During this course you will be learning the following concepts:
11+
During this course, you will be learning the following concepts:
1212

1313
1. How to create and call functions.
1414

@@ -24,7 +24,7 @@ Please click on the `Next →` button on the top right to proceed to the first c
2424

2525
## Useful Readings:
2626

27-
+ [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.)
27+
+ [https://www.w3schools.com/python/python_intro.asp](https://www.w3schools.com/python/python_intro.asp)
2828

2929
+ [https://www.python.org/doc/essays/blurb/](https://www.python.org/doc/essays/blurb/)
3030

@@ -36,11 +36,11 @@ Please click on the `Next →` button on the top right to proceed to the first c
3636

3737
Thanks to these wonderful people ([emoji key](https://github.com/kentcdodds/all-contributors#emoji-key)):
3838

39-
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:
39+
1. [Alejandro Sanchez (alesanchezr)](https://github.com/alesanchezr), contribution: (coder) 💻, (idea) 🤔, (build-tests) ⚠️, (pull-request-review) 🤓, (build-tutorial) ✅, (documentation) 📖
4040

41-
2. [Paolo Lucano (plucodev)](https://github.com/plucodev), contribution: (coder), (build-tests) :warning:
41+
2. [Paolo Lucano (plucodev)](https://github.com/plucodev), contribution: (coder) 💻, (build-tests) ⚠️
4242

43-
3. [Marco Gómez (marcogonzalo)](https://github.com/marcogonzalo), contribution: (translator) :earth_africa:
43+
3. [Marco Gómez (marcogonzalo)](https://github.com/marcogonzalo), contribution: (translator) 🌎
4444

4545

4646
This project follows these specifications: [all-contributors](https://github.com/kentcdodds/all-contributors)

exercises/01-Console/README.es.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
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".
44

5-
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).
5+
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).
66

77
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.
88

@@ -14,12 +14,12 @@ print("Un texto en la consola")
1414

1515
## 📝 Instrucciones:
1616

17-
1. usa **print** para escribir `Hello World!` en la consola.
17+
1. usa `print()` para escribir `Hello World!` en la consola.
1818

1919
## 💡 Pistas:
2020

2121
+ 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:
2222

23-
https://i.imgur.com/w6u4aDd.png
23+
![Botón de compilar](https://i.imgur.com/w6u4aDd.png)
2424

2525
+ Siéntete libre de intentar otras cosas también.

exercises/01-Console/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ tutorial: "https://www.youtube.com/watch?v=2sV-2frucUs"
66

77
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".
88

9-
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).
9+
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).
1010

11-
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.
11+
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.
1212

1313
This is an example of how to use it:
1414

@@ -18,13 +18,13 @@ print("How are you?")
1818

1919
## 📝 Instructions:
2020

21-
1. Use **print** to print `Hello World!` on the console.
21+
1. Use `print()` to print `Hello World!` on the console.
2222

2323

2424
## 💡 Hints:
2525

2626
+ Remember, to run the code and see the output on the console, click on the box icon in the top left of the screen:
2727

28-
https://i.imgur.com/w6u4aDd.png
28+
![The compile button](https://i.imgur.com/w6u4aDd.png)
2929

3030
+ Feel free to try other things as well.

exercises/02-Declare-Variables/README.es.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@ En la programación, usamos variables como si fueran cajas (o contenedores) para
66
name = "Daniel"
77
```
88

9-
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.
9+
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.
1010

1111
## 📝 Instrucciones:
1212

1313
1. Declara una variable con el valor `"Yellow"` y luego imprímelo en la consola.
1414

1515
2. Luego, imprime su valor en la consola usando `print(name)`.
1616

17-
## 💡 Pista:
17+
## 💡 Pistas:
1818

1919
+ Puedes darle el nombre que quieras a la variable, pero su valor tiene que ser el texto "Yellow".
2020

21-
+ 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)
21+
+ 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)

exercises/02-Declare-Variables/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ In this example, `name` is the variable, acting like a box to store the value `"
1818

1919
2. Then, print its value on the console using `print(name)`.
2020

21-
## 💡 Hint:
21+
## 💡 Hints:
2222

2323
+ The name of the variable can be whatever you want, but the value inside has to be the string "Yellow".
24-
+ 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)
24+
25+
+ 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)
Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
1-
# `03` Print Variables in The Console
1+
# `03` Print more Variables in The Console
22

3-
También puedes usar la función **print** para imprimir variables en la consola. Es una excelente forma de verificar su valor actual, así:
3+
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:
44

55
```py
6-
my_super_variable = 'hello'
7-
print(my_super_variable)
6+
my_variable = 'hello'
7+
my_second_variable = "world"
8+
print(my_variable, my_second_variable) # --> hello world
89
```
910

1011
## 📝 Instrucciones:
1112

12-
1. Declara una nueva variable llamada `color` y asígnale el valor `"red"`.
13+
1. Declara dos nuevas variables llamadas `color` y `item` y asígnales el valor `"red"` y `marker` respectivamente.
1314

14-
2. Luego, imprime su valor en la consola (puede que tengas que desplazarte en la consola para poder verlo).
15+
2. Luego, imprime sus valores en la consola (puede que tengas que desplazarte en la consola para poder verlo).
Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
1-
---
2-
tutorial: "https://www.youtube.com/watch?v=Ki1LaUKhPgU"
3-
---
1+
# `03` Print more Variables in the console
42

5-
# `03` Print the Variables in the console
6-
7-
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:
3+
You can also print more than one variable in the same `print()` function by separating the variables with a comma `,`. Like this:
84

95
```py
10-
my_super_variable = 'hello'
11-
print(my_super_variable)
6+
my_variable = 'hello'
7+
my_second_variable = "world"
8+
print(my_variable, my_second_variable) # --> hello world
129
```
1310

1411
## 📝 Instructions:
1512

16-
1. Declare a new variable called `color` and assign the value `"red"` to it.
13+
1. Declare two new variables called `color` and `item`, and assign the value `"red"` and `"marker"` respectively to it.
1714

18-
2. Then, print its value on the console (you may have to scroll up in the terminal to see it!).
15+
2. Then, print their values on the console (you may have to scroll up in the terminal to see it!).
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# ✅ ↓ your code here ↓ ✅
22

33
color = "red"
4-
print(color)
4+
item = "marker"
5+
print(color, item)

exercises/03-Print-Variables-In-The-Console/test.py

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,20 @@
55
import pytest
66
import app
77
import os
8-
import re
8+
99
path = os.path.dirname(os.path.abspath(__file__))+'/app.py'
1010

11-
@pytest.mark.it("Create a variable named 'color' with the string value red")
11+
@pytest.mark.it("Create a variable named 'color' with the string value 'red'")
1212
def test_declare_variable():
1313
result = app.color
1414
assert result == "red"
1515

16-
@pytest.mark.it('Print on the console the value of the variable ')
17-
def test_for_printing_variable():
18-
19-
with open(path, 'r') as content_file:
20-
content = content_file.read()
21-
regex = re.compile(r"print\s*\(\s*color\s*\)")
22-
assert bool(regex.search(content)) == True
16+
@pytest.mark.it("Create a variable named 'item' with the string value 'marker'")
17+
def test_declare_variable():
18+
result = app.item
19+
assert result == "marker"
2320

24-
@pytest.mark.it('The printed value on the console should be "red"')
21+
@pytest.mark.it('The printed value on the console should be "red marker"')
2522
def test_for_file_output(capsys):
2623
captured = buffer.getvalue()
27-
assert "red\n" in captured
24+
assert "red marker\n" in captured

exercises/04-Multiply-Two-Values/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ tutorial: "https://www.youtube.com/watch?v=tATIrAWiLLU"
66

77
Any programming language lets you do basic Math operations like multiplication, division, etc.
88

9-
To multiply 2 values in python, you have to use the asterisk operator like this:
9+
To multiply 2 values in Python, you have to use the asterisk operator like this:
1010

1111
```py
1212
resulting_value = 2 * 3
@@ -18,4 +18,4 @@ In this case, we stored the resulting value of the multiplication into a variabl
1818

1919
1. Please store the result of multiplying 2345 times 7323 in a variable called `variables_are_cool`.
2020

21-
2. Now print the result in the console.
21+
2. Now print the result in the console.

exercises/04-Multiply-Two-Values/test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ def test_variable_exists():
1515
except ImportError:
1616
raise ImportError("The variable 'variables_are_cool' should exist on app.py")
1717

18-
@pytest.mark.it('Variables_are_cool value should be like 2345 * 7323 ')
18+
@pytest.mark.it('The value of variables_are_cool should be 2345 * 7323')
1919
def test_use_variable_name():
2020
result = app.variables_are_cool == 17172435
2121
assert result == True
2222

23-
@pytest.mark.it('Print on the console the variables_are_cool value ')
23+
@pytest.mark.it('Print on the console the value of variables_are_cool')
2424
def test_for_file_output(capsys):
2525
captured = buffer.getvalue()
2626
assert '17172435\n' in captured

0 commit comments

Comments
 (0)