Skip to content

Spelling Error Pull Request #110

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 19 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/python
{
Expand All @@ -21,7 +22,7 @@
"extensions": ["learn-pack.learnpack-vscode"]
}
},
"onCreateCommand": "sudo apt-get update -y && sudo apt-get install xdg-utils -y && pip3 install pytest==6.2.5 pytest-testdox mock && npm i @learnpack/learnpack@2.1.47 -g && learnpack plugins:install @learnpack/[email protected]"
"onCreateCommand": "sudo apt-get update -y && sudo apt-get install xdg-utils -y && pip3 install pytest==6.2.5 pytest-testdox mock && npm i @learnpack/learnpack@4.0.10 -g && learnpack plugins:install @learnpack/[email protected]"

// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},
Expand Down
2 changes: 1 addition & 1 deletion .gitpod.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ RUN echo "unset DATABASE_URL" >> $HOME/.bashrc
RUN echo "export DATABASE_URL" >> $HOME/.bashrc

RUN pip3 install pytest==6.2.5 pytest-testdox mock
RUN npm i @learnpack/[email protected].47 -g && learnpack plugins:install @learnpack/[email protected]
RUN npm i @learnpack/[email protected].56 -g && learnpack plugins:install @learnpack/[email protected]
File renamed without changes
File renamed without changes
File renamed without changes
Binary file added .learn/assets/run-exercise.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion README.es.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!-- hide -->
# 🐍 Tutorial y Ejercicios para Principiantes de Python

Por <a href="https://twitter.com/alesanchezr">@alesanchezr</a> y <a href="https://github.com/4GeeksAcademy/python-beginner-programming-exercises/graphs/contributors">otros colaboradores</a> en <a href="http://4geeksacademy.co/">4Geeks Academy</a><a href="https://www.4geeksacademy.com"><img height="280" align="right" src="https://github.com/ElviraQDP/python-beginner-programming-exercises/blob/master/badge-python-bg.png"></a>
Por <a href="https://twitter.com/alesanchezr">@alesanchezr</a> y <a href="https://github.com/4GeeksAcademy/python-beginner-programming-exercises/graphs/contributors">otros colaboradores</a> en <a href="http://4geeksacademy.co/">4Geeks Academy</a><a href="https://www.4geeksacademy.com"><img height="280" align="right" src="https://github.com/4GeeksAcademy/python-beginner-programming-exercises/blob/master/.learn/assets/badge-python-bg.png?raw=true"></a>
<!-- endhide -->

Esta serie en particular es para principiantes de Python. Aprenderás los siguientes conceptos:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- hide -->
<img height="280" align="right" src="https://github.com/ElviraQDP/python-beginner-programming-exercises/blob/master/badge-python-bg.png?raw=true">
<img height="280" align="right" src="https://github.com/4GeeksAcademy/python-beginner-programming-exercises/blob/master/.learn/assets/badge-python-bg.png?raw=true">


# 🐍 Python Beginner Tutorial and Exercises
Expand Down
4 changes: 4 additions & 0 deletions exercises/00-Welcome/README.es.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
intro: "https://www.youtube.com/watch?v=IXNSwnN-YqM"
---

# Welcome to the Python Beginner Course!

¡Estamos muy entusiasmados por tenerte aquí! 🎉 😂
Expand Down
6 changes: 5 additions & 1 deletion exercises/01-Console/README.es.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
tutorial: "https://www.youtube.com/watch?v=z6OnN4s__TU"
---

# `01` Console

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".
Expand All @@ -20,6 +24,6 @@ print("Un texto en la consola")

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

![Botón de compilar](https://i.imgur.com/w6u4aDd.png)
![Botón de compilar](https://github.com/4GeeksAcademy/python-beginner-programming-exercises/blob/1d9d7f83b678411be8ff9efc3bad9dab4265d057/.learn/assets/run-exercise.png?raw=true)

+ Siéntete libre de intentar otras cosas también.
2 changes: 1 addition & 1 deletion exercises/01-Console/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ print("How are you?")

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

![The compile button](https://i.imgur.com/w6u4aDd.png)
![The compile button](https://github.com/4GeeksAcademy/python-beginner-programming-exercises/blob/1d9d7f83b678411be8ff9efc3bad9dab4265d057/.learn/assets/run-exercise.png?raw=true)

+ Feel free to try other things as well.
4 changes: 4 additions & 0 deletions exercises/02-Declare-Variables/README.es.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
tutorial: "https://www.youtube.com/watch?v=FeSo8xlnrTI"
---

# `02` Declare Variables

En la programación, usamos variables como si fueran cajas (o contenedores) para guardar diferentes tipos de información. Así es cómo creamos una variable:
Expand Down
4 changes: 4 additions & 0 deletions exercises/03-Print-Variables-In-The-Console/README.es.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
tutorial: "https://www.youtube.com/watch?v=SM71mzjuvfA"
---

# `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:
Expand Down
4 changes: 4 additions & 0 deletions exercises/04-Multiply-Two-Values/README.es.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
tutorial: "https://www.youtube.com/watch?v=p4PY8s6asfw"
---

# `04` Multiply Two Values

Cualquier lenguaje de programación te permite realizar operaciones matemáticas básicas como multiplicación, división, etc.
Expand Down
4 changes: 4 additions & 0 deletions exercises/05-User-Inputed-Values/README.es.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
tutorial: "https://www.youtube.com/watch?v=pe_DEzC-528"
---

# `05` User Inputed Values

Otra cosa genial de las variables es que no necesitas saber su valor para poder trabajar con ellas.
Expand Down
4 changes: 4 additions & 0 deletions exercises/06-String-Concatenation/README.es.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
tutorial: "https://www.youtube.com/watch?v=4y8xYy273f4"
---

# `06` String Concatenation

La concatenación de strings es una tarea común en la programación que implica combinar o unir dos o más strings.
Expand Down
4 changes: 4 additions & 0 deletions exercises/07-Create-a-Basic-HTML/README.es.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
tutorial: "https://www.youtube.com/watch?v=zbTM_T6an4k"
---

# `07` Create a Basic HTML

Continuemos concatenando strings para generar un documento HTML básico...
Expand Down
4 changes: 4 additions & 0 deletions exercises/08.1-Your-First-If/README.es.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
tutorial: "https://www.youtube.com/watch?v=n5skqOQfQ84"
---

# `08.1` Your First If...

La aplicación actual está preguntando cuánto dinero tiene el usuario. Una vez el usuario ingresa la cantidad, debemos 'imprimir' usando **print** una de las siguientes respuestas:
Expand Down
5 changes: 5 additions & 0 deletions exercises/08.2-How-Much-The-Wedding-Costs/README.es.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
tutorial: "https://www.youtube.com/watch?v=z3_0x8MlpFs"
---


# `08.2` How Much The Wedding Costs (if...else)

Aquí tenemos una tabla de precios de una compañía de catering de bodas:
Expand Down
4 changes: 4 additions & 0 deletions exercises/09-Random-Numbers/README.es.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
tutorial: "https://www.youtube.com/watch?v=9IjotW64sxA"
---

# `09` Random Numbers

Puedes usar la función `randint()` para obtener un número entero aleatorio. `randint()` es una función interna del módulo `random` en Python3.
Expand Down
4 changes: 4 additions & 0 deletions exercises/10-Calling-Your-First-Function/README.es.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
tutorial: "https://www.youtube.com/watch?v=0Jxyc4eClNA"
---

# `10` Calling Your First Function

Las funciones son increíbles por muchas cosas, pero principalmente porque puedes encapsular tu código en piezas y reusar esas piezas muchas veces sin tener que escribir todo el código cada vez.
Expand Down
4 changes: 4 additions & 0 deletions exercises/10.1-Creating-Your-First-Function/README.es.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
tutorial: "https://www.youtube.com/watch?v=ePn8AzCG57Y"
---

# `10.1` Creating Your First Function

## 📝 Instrucciones:
Expand Down
4 changes: 4 additions & 0 deletions exercises/11-Create-A-New-Function/README.es.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
tutorial: "https://www.youtube.com/watch?v=6LhV15O9kvQ"
---

# `11` Create a New Function

Como sabes, las funciones son un bloque de código útil que puedes reusar tantas veces como necesites.
Expand Down
26 changes: 17 additions & 9 deletions exercises/11-Create-A-New-Function/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,34 +7,42 @@
import mock
path = os.path.dirname(os.path.abspath(__file__))+'/app.py'


@pytest.mark.it('The function generate_random should exist')
def test_function_exists():
try:
from app import generate_random
except ImportError:
raise ImportError("The function 'generate_random' should exist on app.py")
raise ImportError(
"The function 'generate_random' should exist on app.py")


@pytest.mark.it("The function 'generate_random' should return a random number between 0 and 9")
def test_for_return():
from app import generate_random
result = generate_random()
assert result is not None
for x in range(0,20):
for x in range(0, 20):
result = generate_random()
assert result <= 9 and result >= 0
assert result <= 9 and result >= 0


@pytest.mark.it('Use the function randinit() or randrange()')
def test_for_type_random():
with open(path, 'r') as content_file:
content = content_file.read()
regex = re.compile(r"random.randint\s*\(")
regex2 = re.compile(r"random.randrange\s*\(")
assert bool(regex.search(content)) == True or bool(regex2.search(content)) == True
assert bool(regex.search(content)) == True or bool(
regex2.search(content)) == True


@pytest.mark.it('You should print() the output of the function')
def test_function_called_for():

with open(path, 'r') as content_file:
content = content_file.read()
regex = re.compile(r"print\s*\(\s*generate_random\s*\(\s*\)\s*\)")
assert bool(regex.search(content)) == True
captured_output = io.StringIO()
sys.stdout = captured_output
app.generate_random()
sys.stdout = sys.__stdout__
output = captured_output.getvalue()
regex = re.compile(r"\d{0,9}")
assert bool(regex.search(output)) == True
4 changes: 4 additions & 0 deletions exercises/12-Rand-From-One-to-Twelve/README.es.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
tutorial: "https://www.youtube.com/watch?v=tqZIlc1gVi8"
---

# `12` Rand From One to Twelve

## 📝 Instrucciones:
Expand Down
4 changes: 4 additions & 0 deletions exercises/13-Your-First-Loop/README.es.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
tutorial: "https://www.youtube.com/watch?v=0-vljraNvwE"
---

# `13` Your First Loop

## 📝 Instrucciones:
Expand Down
4 changes: 4 additions & 0 deletions exercises/14-Create-A-For-Loop/README.es.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
tutorial: "https://www.youtube.com/watch?v=ckSAqxzi5vs"
---

# `14` Create A For Loop

Los bucles o loops son muy útiles. No tienes que reescribir las mismas líneas muchas veces.
Expand Down
4 changes: 4 additions & 0 deletions exercises/15-Looping-With-FizzBuzz/README.es.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
tutorial: "https://www.youtube.com/watch?v=VkAccivrOPM"
---

# `15` Looping With FizzBuzz

Esta es una típica prueba de principiante que es exigida para las entrevistas en Google, Facebook y las demás grandes compañías de tecnología.
Expand Down
5 changes: 5 additions & 0 deletions exercises/16-Random-Colors-Loop/README.es.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
tutorial: "https://www.youtube.com/watch?v=jYK2i0_dtns"
---


# `16` Random Colors (Loop)

Hemos creado una función que devuelve un color basado en un número entre 0 y 3 (cualquier otro número retornará el color `black`).
Expand Down
4 changes: 4 additions & 0 deletions exercises/17-Russian-Roulette/README.es.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
tutorial: "https://www.youtube.com/watch?v=KqO8ebdqs5I"
---

# `17` Russian Roulette

¿Has jugado a la ruleta rusa? ¡Es muy divertido! Si no pierdes... (¡¡¡muuuajajajaja!!!).
Expand Down
4 changes: 4 additions & 0 deletions exercises/18-The-Beatles/README.es.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
tutorial: "https://www.youtube.com/watch?v=0Y2mHwwQBGE"
---

# `18` The Beatles

¿A quién no le gusta The Beatles?
Expand Down
9 changes: 5 additions & 4 deletions exercises/18-The-Beatles/solution.hide.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# ✅↓ Write your code here ↓✅
def sing():
song = ""
for i in range(11):
if i == 4:
print("there will be an answer,")
song += "there will be an answer,\n"
elif i == 10:
print("whisper words of wisdom, let it be")
song += "whisper words of wisdom, let it be"
else:
print("let it be,")
return None
song += "let it be,\n"
return song

sing()
4 changes: 4 additions & 0 deletions exercises/19-Bottles-Of-Milk/README.es.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
tutorial: "https://www.youtube.com/watch?v=iLH9Hg4PAmw"
---

# `19` Bottles Of Milk

¿Has escuchado la canción sobre las 99 botellas de leche? Es una gran canción, para nada aburrida...
Expand Down
59 changes: 35 additions & 24 deletions learn.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,37 @@

{
"slug": "python-beginner-programming-exercises",
"title": {
"us": "Learn Python Interactively (beginner)",
"es": "Aprende Python Interactivamente (Principiante)"
},
"intro": "https://www.youtube.com/watch?v=amyDNhZwGJQ",
"repository": "https://github.com/4GeeksAcademy/python-beginner-programming-exercises",
"preview": "https://github.com/4GeeksAcademy/python-beginner-programming-exercises/blob/master/preview.png?raw=true",
"description": {
"us": "Python Exercises for beginners, from Hello World to variables, loops and a little bit of functions.",
"es": "Ejercicios de Python para principiantos, desde Hello World hasta variables, ciclos y un poco de funciones."
},
"duration": 10,
"difficulty": "easy",
"videoSolutions": true,
"projectType": "tutorial",
"bugsLink": "https://github.com/learnpack/learnpack/issues/new",
"graded": true,
"language": "python3",

"editor": {
"version": "3.1.24"
}

"slug": "python-beginner-programming-exercises",
"title": {
"us": "Learn Python Interactively (beginner)",
"es": "Aprende Python Interactivamente (Principiante)"
},
"intro": "https://www.youtube.com/watch?v=amyDNhZwGJQ",
"repository": "https://github.com/4GeeksAcademy/python-beginner-programming-exercises",
"preview": "https://github.com/4GeeksAcademy/python-beginner-programming-exercises/blob/master/.learn/assets/preview.png?raw=true",
"description": {
"us": "Python Exercises for beginners, from Hello World to variables, loops and a little bit of functions.",
"es": "Ejercicios de Python para principiantos, desde Hello World hasta variables, ciclos y un poco de funciones."
},
"duration": 10,
"difficulty": "easy",
"videoSolutions": true,
"projectType": "tutorial",
"bugsLink": "https://github.com/learnpack/learnpack/issues/new",
"graded": true,
"language": "python3",

"editor": {
"version": "4.0"
},
"telemetry": {
"batch": "https://breathecode.herokuapp.com/v1/assignment/me/telemetry"
},
"video": {
"intro": {
"es": "https://www.youtube.com/watch?v=IXNSwnN-YqM",
"en": "https://www.youtube.com/watch?v=amyDNhZwGJQ"
}
}


}
Loading