Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions exercises/14-Your-First-Loop/README.es.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# `14` Tu primer bucle o loop

Si ejecutas este código verás una cuenta de 0 a 9 (caracteres blancos).

1. Corrígelo para que cuente hasta 11,verás 101 en verde después.


**¿Puedes corregirlo?**

### :mag_right: Important:

Hay una serie de ejercicios dedicados a listas y bucles o loops, te invitamos a realizar [esos](https://github.com/4GeeksAcademy/python-lists-loops-programming-exercises) primero antes de continuar con el siguiente ejercicio.

¡Y luego, regresa! :smiley.
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,18 @@
tutorial: "https://www.youtube.com/watch?v=30sizcnVdGg"
---

# `15` Your First Loop
# `14` Your First Loop

If you run this code you'll see a count from 0 to 9 (White characters).

1. Fix it so that it counts up to 11, you'll see 101 on green afterwards.


**Can you fix it?**

If you run this code you'll see a count from 0 to 9 (White characters). Fix it so that it counts up to 11, you'll see 101 on green afterwards.

### :mag_right: Important:

There's a series of exercises dedicated to Lists and Loops, we encourage you to go and finish [those](https://github.com/4GeeksAcademy/python-lists-loops-programming-exercises) after this exercise. (

And then, come back! :smiley:).

**Can you fix it?**
And then, come back! :smiley:).
50 changes: 50 additions & 0 deletions exercises/15-Looping-With-FizzBuzz/README.es.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# `15` Iterando con 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.


## 📝 Instrucciones:

1. Escribe el código necesario para imprimer en la consola todos los números del 1 al 100:

+ Para múltiplos de 3, en lugar de imprimir el número, imprime "Fizz".

+ Para múltiplos de 5, imprime "Buzz".

+ Para números que son múltiplos de 3 y de 5, imprime "FizzBuzz".

## Resultado esperado:

```py

1
2
Fizz
4
Buzz
Fizz
7
8
Fizz
Buzz
11
Fizz
13
14
FizzBuzz
16
....
....
98
Fizz
Buzz


```


### :mag_right: Important:

Hay una serie de ejercicios dedicados a listas y ciclos, te invitamos a realizar [esos](https://github.com/4GeeksAcademy/python-lists-loops-programming-exercises) primero antes de continuar con el siguiente ejercicio.

¡Y luego, regresa! :smiley.
54 changes: 54 additions & 0 deletions exercises/15-Looping-With-FizzBuzz/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
tutorial: "https://www.youtube.com/watch?v=fw3ukgmlSwQ"
---

# `15` Looping With FizzBuzz

This is a typical beginner test that is required to complete interviews in Google, Facebook and all the other big tech unicorns.


## 📝 Instructions:

1. Write the code needed to print in the console all the numbers from 1 to 100:

+ For multiples of 3, instead of the number, print "Fizz".

+ For multiples of 5, print "Buzz".

+ For numbers which are multiples of both 3 and 5, print "FizzBuzz".


## Expected result:

```py

1
2
Fizz
4
Buzz
Fizz
7
8
Fizz
Buzz
11
Fizz
13
14
FizzBuzz
16
....
....
98
Fizz
Buzz


```

### :mag_right: Important:

There's a series of exercises dedicated to Lists and Loops, we encourage you to go and finish [those](https://github.com/4GeeksAcademy/python-lists-loops-programming-exercises) after this exercise. (

And then, come back! :smiley:).
8 changes: 0 additions & 8 deletions exercises/15-Your-First-Loop/README.es.md

This file was deleted.

22 changes: 22 additions & 0 deletions exercises/16-Random-Colors-Loop/README.es.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# `16` Colores aleatorios (ciclo)

Hemos creado una función que devuelve un color basado en un número entre 1 y 4 (for any different number, it will return the color `black`).

## 📝 Instrucciones:

Digamos que somos profesores en un aula con 10 estudiantes y queremos asignar a CADA ESTUDIANTE un color aleatorio entre `red`(rojo), `yellow` (amarillo),`blue` (azul) y `green` (verde).

(solo UN color POR estudiante)

1. Cambia la función `get_allStudentColors` para que devuelva una lista con 10 colores, en donde cada elemento de la lista representa el color asignado a cada estudiante.

## 💡 Pista:

- Tienes 10 estudiantes, necesitar que el ciclo itere 10 veces.

- En cada iteración, genera un número aleatorio entre 1 y 4 usando la función `randint()` que hemos visto en ejercicios anteriores.

- Usa la función `get_color` en este ejercicio saber qué color le corresponde al número obtenido.

- Llama (ejecuta) la funcion `get_allStudentColors` e imprime su resultado en la consola

26 changes: 26 additions & 0 deletions exercises/16-Random-Colors-Loop/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
tutorial: "https://www.youtube.com/watch?v=8zH3JT3AuAw"
---

# `16` Random Colors (Loop)

We have created a function that returns a color based on a number between 1 and 4 (for any different number, it will return the color `black`).

## 📝 Instructions:

Let's say that we are teachers in a 10 student classroom and we want to randomly assign ONE color, between `red`, `yellow`, `blue` and `green`, to EACH student.

(only ONE color PER student)

1. Change the function `get_allStudentColors` so it returns an list of 10 colors, were each item in the list represents the color assigned to each student.

## 💡 Hint:

- You have 10 students, you need to loop 10 times.

- Each time you loop, generate a random number between 1-4 using the `randint()` function we saw on the last exercise.

- Use the `get_color` function on this exercise to get the color name from the number you get.

- call the function `get_allStudentColors` and print the result on the console.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# `20` Ruleta rusa
# `17` Ruleta rusa

¿Has jugado a la ruleta rusa? ¡Es muy divertida! Si no pierdes... (¡¡¡muuuajajajaja!!!).

Expand All @@ -9,11 +9,11 @@ gira la cámara del revolver para hacer aleatorio el juego. Nadie sabrá dónde


## 📝 Instrucciones:
1. El juego casi funciona, por favor completa la función "**fire_gun**" para hacer que el juego funcione

1. El juego casi funciona, por favor completa la función `fire_gun` para hacer que el juego funcione
(compara la posición de la bala contra la posición de la cámara.)


## 💡 Sugerencia:
## 💡 Pista:

- La función necesita devolver **You are dead!** o **Keep playing!** dependiendo del resultado, si la bala estaba
en el mismo orificio que la cámara del revolver, entonces fue disparada (**You are dead!**).
- La función necesita devolver `You are dead!` (Estás muerto) o `Keep playing!` (Sigue jugando) dependiendo del resultado, si la bala está en la misma recámara que la del revolver, entonces fue disparada (You are dead!).
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# `20` Russian Roulette
# `17` Russian Roulette

Have you ever played Russian Roulette? It's super fun! If you make it (wuuuajajajaja).

Expand All @@ -9,11 +9,13 @@ FIRE!!!....... are you dead?


## 📝 Instructions:
1. The game is almost working, please fill the function "**fire_gun**" to make the game work

1. The game is almost working, please fill the function `fire_gun` to make the game work
(compare the bullet position against the chamber position.)


## 💡 Hint:

- The function needs to return **You are dead!** or **Keep playing!** depending on the result, if the bullet was
at the same slot as the revolver chamber, then it will be fired (**You are dead!**).
- The function needs to return `You are dead!` or `Keep playing!` depending on the result.

- If the bullet is at the same slot as the revolver chamber, then it will be fired (`You are dead!`).
19 changes: 0 additions & 19 deletions exercises/18-Random-Colors-Loop/README.es.md

This file was deleted.

23 changes: 0 additions & 23 deletions exercises/18-Random-Colors-Loop/README.md

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# `21` The Beatles
# `18` The Beatles

¿A quién no le gusta The Beatles?

Un estudio de la BBC ha probado que el 90% de los niños y niñas no conocen la banda... muy triste... :(

Este es el coro de una de las canciones más famosas de la banda:
Expand All @@ -10,11 +11,13 @@ Este es el coro de una de las canciones más famosas de la banda:
> Let it be

## 📝 Instrucciones:
1. Crea una función llamada **sing()**
2. La función necesita **imprimir** (usa el método `print()` y no `return`) un texto con la misma letra
que puedes escuchar desde el segundo 3:10 hasta el final de la canción en el segundo 3:54.

Esta es la salida que esperada:
1. Crea una función llamada `sing()`

2. La función necesita **print** (usa el método `print()` y no `return`) un texto con la misma letra
[que puedes escuchar desde el segundo 3:10 hasta el final de la canción en el segundo 3:54](https://www.youtube.com/watch?v=QDYfEBY9NM4)..

## Resultado esperado:

```sh
let it be,
Expand All @@ -27,8 +30,7 @@ let it be,
let it be,
there will be an answer, let it be
```
(https://www.youtube.com/watch?v=2xDzVZcqtYI)

## 💡 Sugerencia:
## 💡 Pista:

- La frase "let it be" se repite todo el tiempo. Probablemente deberías usar un ciclo para eso ;-)
- La frase "let it be" se repite todo el tiempo. Probablemente deberías usar un bucle o loop para eso :smiley:
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
tutorial: "https://www.youtube.com/watch?v=cuSaRROMTDY"
---

# `21` The Beatles
# `18` The Beatles

Who does not like The Beatles?

A BBC study has proved that 90% of kids don't know the band.. so sad.. :(

This is the chorus of one of the most famous Beatle songs:
Expand All @@ -14,10 +15,14 @@ This is the chorus of one of the most famous Beatle songs:
> Let it be

## 📝 Instructions:
1. Create a function called **sing()**
2. The function needs to **print** (use the print statement and no return) a string with the exact same lyrics

1. Create a function called `sing()`

2. The function needs to **print** (use the `print` statement and not `return`) a string with the exact same lyrics
[you can hear from the 3:10 sec to the end of the song at 3:54 sec](https://www.youtube.com/watch?v=QDYfEBY9NM4).
Here is the expected output:


## Expected result:

```sh
let it be,
Expand All @@ -33,4 +38,4 @@ there will be an answer, let it be

## 💡 Hint:

- The words "let it be" repeat all the time, probably you should create a loop for that.
- The words "let it be" repeat all the time, you should probably create a loop for that.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
# `22` Botellas de leche
# `19` Botellas de leche

¿Has escuchado la canción sobre las 99 botellas de leche? Es una gran canción, para nada aburrida...
Aquí puedes escucharla: https://www.youtube.com/watch?v=Xy-da43E6Lo


## 📝 Instrucciones:
1. Por favor, declara un método **number_of_bottles()**
2. La función necesita **imprimir** (usa el método `print()` y no `return`) la letra exacta de la canción.

1. Por favor, declara una función llamada `number_of_bottles()`.

## 💡 Sugerencia:
2. La función necesita **print** para imprimir la letra exacta de la canción (usa el método `print()` y no `return`).

## :bulb: Pista:

- Al final de la canción, la letra cambia porque es solo una botella (singular en lugar del plural).

- Lee la última parte de la letra y verás como cambia la última línea a "go to the store and by some more".

## Resultado esperado:

El resultado debería ser algo como esto:

```sh
Expand Down
Loading