Skip to content

Commit e1b97bd

Browse files
conflict solved
2 parents 8615164 + 6be6019 commit e1b97bd

File tree

139 files changed

+1059
-1003
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

139 files changed

+1059
-1003
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
!bc.json
88
!learn.json
99
!README.md
10-
!README.*.md
10+
!README.es.md
1111

1212
!/exercises
1313
!/exercises/*

.gitpod.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ FROM gitpod/workspace-full:latest
44
USER gitpod
55

66
RUN pip3 install pytest==4.4.2 pytest-testdox mock
7-
RUN npm i learnpack@0.1.19 -g && learnpack plugins:install learnpack-python@0.0.36
7+
RUN npm i @learnpack/learnpack -g && learnpack plugins:install learnpack-python@0.0.36
88

.gitpod.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ ports:
77

88
vscode:
99
extensions:
10-
- learnpack.learnpack-vscode
10+
- learn-pack.learnpack-vscode
1111

1212
github:
1313
prebuilds:

README.es.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
<!-- hide -->
2+
# 🐍 Tutorial Master Python
3+
4+
<p>Por <a href="https://twitter.com/alesanchezr">@alesanchezr</a> y <a href="https://github.com/4GeeksAcademy//master-python-programming-exercises/graphs/contributors">otros colaboradores</a> de <a href="http://4geeksacademy.co/">4Geeks Academy</a><a href="https://www.4geeksacademy.co"><img height="280" align="right" src="https://raw.githubusercontent.com/ElviraQDP/master-python-programming-exercises/master/badge-master-python.png"></a>
5+
6+
<!-- endhide -->
7+
8+
Después de terminar la serie de principiantes, funciones y bucles; Esta serie realmente lo preparará para su próximo trabajo o cualquier otro desafío de programación. Practique todo lo que necesita saber para construir algoritmos con python, desde desafíos intermedios hasta difíciles: todo el tutorial es 👆 interactivo, ✅ calificado automáticamente y con 📹 videos tutoriales.
9+
10+
<!-- hide -->
11+
Estos Ejercicios son colaborativos, ¡te necesitamos! Si encuentras algún error o falta de ortografía, por favor contribuye y repórtalo.
12+
13+
## Instalación en un clic:
14+
15+
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io#https://github.com/4GeeksAcademy/master-python-programming-exercises.git)
16+
17+
18+
## Instalación local:
19+
20+
1. Instala learnpack, el administrador de paquetes para tutoriales de aprendizaje y el complemento del compilador html para learnpack, asegúrate de tener también node.js 14+:
21+
22+
```
23+
$ npm i learnpack -g
24+
$ learnpack plugins:install learnpack-python
25+
```
26+
27+
2. Descarga este ejercicio en particular usando learnpack y `cd` para entrar en la carpeta:
28+
29+
```
30+
$ learnpack download master-python-programming-exercises
31+
$ cd master-python-programming-exercises
32+
```
33+
34+
Nota: Una vez que termine de descargar, encontrarás la carpeta "exercises" que contiene todos los ejercicios.
35+
36+
3. Comienza con los ejercicios ejecutando el siguiente en el mismo nivel que tu archivo learn.json:
37+
38+
```sh
39+
$ RUN pip3 install pytest==4.4.2 pytest-testdox mock
40+
$ learnpack start
41+
```
42+
<!-- endhide -->
43+
Note: The exercises have automatic grading but its very rigid and string, my recomendation is to ignore the tests and use them only as a recomendation or you can get frustrated.
44+
45+
46+
## ¿Cómo están organizados los ejercicios?
47+
48+
Cada ejercicio es un pequeño proyecto en Python que contiene los siguientes archivos:
49+
50+
1. **app.py:** representa el archivo de entrada de python que será ejecutado en el computador.
51+
2. **README.md:** contiene las instrucciones del ejercicio.
52+
3. **test.py:** no tienes que abrir este archivo. Contiene los scripts de pruebas del ejercicio.
53+
54+
# Colaboradores
55+
56+
Gracias a estas personas maravillosas ([emoji key](https://github.com/kentcdodds/all-contributors#emoji-key)):
57+
58+
1. [Alejandro Sanchez (alesanchezr)](https://github.com/alesanchezr), contribución: (programador) 💻 (idea) 🤔, (build-tests) ⚠️ , (pull-request-review) 🤓 (build-tutorial) ✅ (documentación) 📖
59+
60+
2. [Paolo (plucodev)](https://github.com/plucodev), contribución: (bug reports) 🐛, (programador), (traducción) 🌎
61+
62+
3. [Marco Gómez (marcogonzalo)](https://github.com/marcogonzalo), contribution: (bug reports) 🐛, (translation) 🌎
63+
64+
Este proyecto sigue la especificación [all-contributors](https://github.com/kentcdodds/all-contributors). ¡Todas las contribuciones son bienvenidas!

README.md

Lines changed: 18 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,14 @@
1-
<table>
2-
<tr>
3-
<td><img src="https://assets.breatheco.de/apis/img/images.php?blob&random&cat=icon&tags=4geeks,32"></td>
4-
<td>
5-
<h1> 🐍 Mastering Python Algorithms Tutorial</h1>
6-
<p>By <a href="https://twitter.com/alesanchezr">@alesanchezr</a> and <a href="https://github.com/4GeeksAcademy//master-python-programming-exercises/graphs/contributors">other contributors</a> at <a href="http://4geeksacademy.co/">4Geeks Academy</a></p>
7-
<img src="https://img.shields.io/github/last-commit/4geeksacademy/master-python-programming-exercises" />
8-
<a href="https://breatheco.de"><img src="https://img.shields.io/badge/certified-BreatheCode-blue" /></a>
9-
<a href="https://twitter.com/alesanchezr"><img src="https://img.shields.io/twitter/follow/alesanchezr?style=social&logo=twitter" alt="follow on Twitter"></a>
10-
<a href="https://gitpod.io#https://github.com/4GeeksAcademy/master-python-programming-exercises.git"><img src="https://img.shields.io/badge/Gitpod-ready--to--code-blue?logo=gitpod" /></a>
11-
</td>
12-
</tr>
13-
</table>
1+
<!-- hide -->
2+
# 🐍 Mastering Python Algorithms Tutorial
143

15-
After you finished the begginers, functions and loops series; This series will really prepare you for your next job or any any other programming challenge. Practice everything there you need to know to build algorithms with python, from intermadiate to hard challenges: The entire tutorial is 👆 interactive, ✅ auto-graded and with. 📹 video tutorials.
4+
By <a href="https://twitter.com/alesanchezr">@alesanchezr</a> and <a href="https://github.com/4GeeksAcademy//master-python-programming-exercises/graphs/contributors">other contributors</a> at <a href="http://4geeksacademy.co/">4Geeks Academy</a>
5+
6+
<a href="https://www.4geeksacademy.co"><img height="280" align="right" src="https://raw.githubusercontent.com/4GeeksAcademy/master-python-programming-exercises/master/badge-master-python.png" /></a>
167

17-
<h3>📚 Table of contents:</h3>
18-
<table>
19-
<tr>
20-
<td>1. <a href="https://github.com/4GeeksAcademy/python-beginner-programming-exercises">Python for Beginners</a> </td>
21-
</tr>
22-
<tr color="white"><td>2. <a href="https://github.com/4GeeksAcademy/python-lists-loops-programming-exercises">Practice Looping Lists and Tuples</a></td></tr>
23-
<tr><td>3. <a href="https://github.com/4GeeksAcademy/python-functions-programming-exercises">Practice functions</a></td></tr>
24-
<tr><td>4. <a href="https://github.com/4GeeksAcademy/master-python-programming-exercises">Master Python (intermediate)</a></td>
25-
<td>← 🔥 your are here now</td>
26-
<td><a href="https://gitpod.io#https://github.com/4GeeksAcademy/master-python-programming-exercises.git"><img src="https://gitpod.io/button/open-in-gitpod.svg" /></a></td>
27-
</tr>
28-
<tr><td>5. <a href="https://github.com/4GeeksAcademy/python-http-requests-api-tutorial-exercises">Python API Requests</a></td></tr>
29-
<tr><td>6. What next? <a href="https://github.com/4GeeksAcademy/About-4Geeks-Academy/issues/new">Request a new tutorial</a> or <a href="https://github.com/4GeeksAcademy/About-4Geeks-Academy/labels/help%20wanted">collaborate</a>.<br /> We will feature your profile in our list of contributors</td></tr>
30-
</table>
8+
<!-- endhide -->
9+
After you finished the begginers, functions and loops series; This series will really prepare you for your next job or any any other programming challenge. Practice everything there you need to know to build algorithms with python, from intermadiate to hard challenges: The entire tutorial is 👆 interactive, ✅ auto-graded and with. 📹 video tutorials.
3110

11+
<!-- hide -->
3212
These exercises were built in collaboration, we need you! If you find any bugs or misspells plese contribute and report them.
3313

3414
<h2>One click installation:</h2>
@@ -38,7 +18,7 @@ These exercises were built in collaboration, we need you! If you find any bugs o
3818

3919
## Local Installation
4020

41-
1. Install learnpack, the package manager for learning tutorials and the html compiler plugin for learnpack, make sure you also have node.js 12+:
21+
1. Install learnpack, the package manager for learning tutorials and the html compiler plugin for learnpack, make sure you also have node.js 14+:
4222

4323
```
4424
$ npm i learnpack -g
@@ -61,6 +41,8 @@ $ RUN pip3 install pytest==4.4.2 pytest-testdox mock
6141
$ learnpack start
6242
```
6343

44+
<!-- endhide -->
45+
6446
Note: The exercises have automatic grading but its very rigid and string, my recomendation is to ignore the tests and use them only as a recomendation or you can get frustrated.
6547

6648

@@ -76,10 +58,11 @@ Each exercise is a small react application containing the following files:
7658

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

79-
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:
80-
2. [Paolo (plucodev)](https://github.com/plucodev), contribution: (bug reports) :bug:, contribution: (coder), (translation) :earth_americas:
81-
3. [Marco Gómez (marcogonzalo)](https://github.com/marcogonzalo), contribution: (bug reports) :bug:, (translation) :earth_africa:
61+
1. [Alejandro Sanchez (alesanchezr)](https://github.com/alesanchezr), contribution: (coder) 💻 (idea) 🤔, (build-tests) ⚠️ , (pull-request-review) 👀 (build-tutorial) ✅ (documentation) 📖
62+
63+
2. [Paolo (plucodev)](https://github.com/plucodev), contribution: (bug reports) 🐛, contribution: (coder), (translation) 🌎
64+
65+
3. [Marco Gómez (marcogonzalo)](https://github.com/marcogonzalo), contribution: (bug reports) :🐛, (translation) 🌎
66+
8267

83-
This project follows the
84-
[all-contributors](https://github.com/kentcdodds/all-contributors)
85-
specification. Contributions of any kind are welcome!
68+
This project follows the[all-contributors](https://github.com/kentcdodds/all-contributors) specification.Contributions of any kind are welcome!

exercises/000-welcome/README.es.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Bienvenid@ a Python!
2+
3+
¡¡Nos estusiasma mucho tenerte aquí!! 🎉 😂
4+
5+
Este es el último de una serie de ejercicios publicados para practicar Python desde cero por [@alesanchezr](https://twitter.com/alesanchezr) y [4GeeksAcademy](https://4geeksacademy.com).
6+
7+
Si no haz completado los otros ejercicios te recomiendo que empieces por alli:
8+
9+
1. [Python for beginners](https://github.com/4GeeksAcademy/python-beginner-programming-exercises)
10+
11+
2. [Practice Looping Lists and Tuples](https://github.com/4GeeksAcademy/python-lists-loops-programming-exercises)
12+
13+
3. [Practice Functions](https://github.com/4GeeksAcademy/python-functions-programming-exercises)
14+
15+
16+
Presiona `Next →` en la esquina superior derecha cuando quieras empezar.

exercises/000-welcome/README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Welcome to Python!
2+
3+
We are very excited to have you here !! 🎉 😂
4+
5+
This is the last series of exercises of a list of Python interactive tutorials published by [@alesanchezr](https://twitter.com/alesanchezr) with [4GeeksAcademy](https://4geeksacademy.com).
6+
7+
If you have not completed them and you are new to javascript, I strongly recomend you start with:
8+
9+
1. [Python for beginners](https://github.com/4GeeksAcademy/python-beginner-programming-exercises)
10+
11+
2. [Practice Looping Lists and Tuples](https://github.com/4GeeksAcademy/python-lists-loops-programming-exercises)
12+
13+
3. [Practice Functions](https://github.com/4GeeksAcademy/python-functions-programming-exercises)
14+
15+
Click `Next →` on the top right of this instructions when you are ready to start.
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
# `02` Hola, Mundo
1+
# `001` hello world
22

33
En Python, usamos `print` para hacer que el computador escriba cualquier cosa que queramos (el contenido de una variable, un texto dado, etc.) in algo llamado `la consola`.
44

55
Cada idioma tiene funciones para integrarse con la consola, ya que al principio era la única forma de interactuar con los usuarios (antes de que llegara Windows o MacOS o Linux).
66

7-
Hoy en día, la impresión en la consola se utiliza sobre todo como herramienta de monitorización, ideal para dejar un rastro del contenido de las variables durante la ejecución del programa.
7+
Hoy en día, la impresión en la consola se utiliza sobre todo como herramienta de monitoreo, ideal para dejar un rastro del contenido de las variables durante la ejecución del programa.
8+
9+
## Ejemplo:
810

9-
Este es un ejemplo de cómo usarlo:
1011
```py
1112
print("How are you?")
1213
```
1314

1415
## 📝 Instrucciones:
1516

16-
1. Usa la función `print()` para escribir "Hello World" en la consola. Siéntete libre de intentar otras cosas también.
17+
1. Usa la función `print()` para escribir `"Hello World"` en la consola. Siéntete libre de intentar otras cosas también.
1718

1819
## 💡 Pista:
1920

20-
Video de 5 minutos sobre la consola:
21-
https://www.youtube.com/watch?v=vROGBvX_MHQ
21+
+ Video de 5 minutos sobre [la consola](https://www.youtube.com/watch?v=vROGBvX_MHQ)
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1-
# `02` Hello World
1+
# `001` hello world
22

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

55
Every language has a console, as it was the only way to interact with the users at the beginning (before the Windows or MacOS arrived).
66

77
Today, printing in the console is used mostly as a monitoring tool, ideal to leave a trace of the content of variables during the program execution.
88

9-
This is an example of how to use it:
9+
## Example:
10+
1011
```py
1112
print("How are you?")
1213
```
@@ -17,5 +18,4 @@ print("How are you?")
1718

1819
## 💡 Hint:
1920

20-
5 minutes video about the console:
21-
https://www.youtube.com/watch?v=1RlkftxAo-M
21+
+ 5 minutes video about [the console](https://www.youtube.com/watch?v=1RlkftxAo-M)
File renamed without changes.
File renamed without changes.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# `002` sum of three numbers
2+
3+
## 📝 Instrucciones:
4+
5+
1. Teniendo tres números de entrada, imprime su suma. Cada número va en una línea aparte.
6+
7+
## Ejemplo de entrada:
8+
9+
+ 2
10+
+ 3
11+
+ 6
12+
13+
## Ejemplo de salida:
14+
15+
+ 11
16+
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
# `03` Sum of three numbers
1+
# `002` sum of three numbers
22

33
## 📝 Instructions:
44

55
1. Taking 3 numbers from the input, print their sum. Every number is given on a separate line.
66

7-
### Example input:
7+
## Example input:
88

9-
- 2
10-
- 3
11-
- 6
9+
+ 2
10+
+ 3
11+
+ 6
1212

13-
### Example output:
13+
## Example output:
1414

15-
- 11
15+
+ 11
1616

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# `003` area of right triangle
2+
3+
## 📝 Instrucciones:
4+
5+
1. Completa la función `area_of_triangle()` para que que tome el largo de la base y la altura de un triángulo rectángulo e imprima su área. Cada número es dado en una línea por separado.
6+
7+
![Imagen descriptiva](http://i.imgur.com/6EkzVxA.jpg)
8+
9+
## Ejemplo:
10+
11+
```py
12+
area_of_triangle(3,5)
13+
print(7.5)
14+
```
15+
## 💡 Pistas:
16+
17+
+ Si no sabes por donde empezar este ejercicio, por favor, revisa la teoría en esta lección: https://snakify.org/lessons/print_input_numbers/
18+
19+
+ También puedes intentar paso a paso con trozos de la teoría: https://snakify.org/lessons/print_input_numbers/steps/1/
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# `003` area of right triangle
2+
3+
## 📝 Instructions:
4+
5+
1. Complete the `area_of_triangle()` function so that it reads the length of the base and the height of a right-angled triangle and prints the area. Every number is given on a separate line.
6+
7+
![Image description](http://i.imgur.com/6EkzVxA.jpg)
8+
9+
## Ejemplo:
10+
11+
```py
12+
area_of_triangle(3,5)
13+
print(7.5)
14+
```
15+
## 💡 Hints:
16+
17+
+ If you don't know how to start solving this exercise, please, review a theory for this lesson: https://snakify.org/lessons/print_input_numbers/
18+
19+
+ You may also try step-by-step theory chunks: https://snakify.org/lessons/print_input_numbers/steps/1/
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# `004` hello Harry
2+
3+
## 📝 Instrucciones:
4+
5+
1. Completa la función `hello_name()` para que salude al usuario imprimiendo la palabra `Hello`, luego le agregue una coma, el nombre del usuario y un signo de exclamación después de él.
6+
7+
*La salida de tu función debe coincidir estrictamente con la deseada, caracter por caracter. No debe haber ningún espacio entre el nombre y el signo de exclamación.*
8+
9+
## Ejemplo entrada:
10+
11+
```py
12+
hello_name("Harry")
13+
```
14+
## Ejemplo de salida:
15+
16+
Hello, Harry!
17+
18+
## 💡 Pistas:
19+
20+
+ Puedes usar el operador '+' para concatenar dos strings de texto. Ve la lección para más detalles.
21+
22+
+ Si no sabes por donde partir este ejercicio por favor, revisa la teoría en esta lección:
23+
https://snakify.org/lessons/print_input_numbers/
24+
25+
+ También puedes intentar paso a paso con trozos de la teoría:
26+
https://snakify.org/lessons/print_input_numbers/steps/1/

exercises/004-hello_harry/README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# `004` hello Harry
2+
3+
## 📝 Instructions:
4+
5+
1. Complete the `hello_name()` function that greets the user by printing the word `Hello`, a comma, the name of the user and an exclamation mark after it.
6+
7+
*Your function's output should strictly match the desired one, character by character. There shouldn't be any space between the name and the exclamation mark.*
8+
9+
## Example input:
10+
11+
```py
12+
hello_name("Harry")
13+
```
14+
15+
## Example output:
16+
17+
Hello, Harry!
18+
19+
## 💡 Hints:
20+
21+
+ You can use '+' operator to concatenate two strings. See the lesson for details.
22+
23+
+ If you don't know how to start solving this assignment, please, review a theory for this lesson: https://snakify.org/lessons/print_input_numbers/
24+
25+
+ You may also try step-by-step theory chunks: https://snakify.org/lessons/print_input_numbers/steps/1/
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)