File tree

66 files changed

+401
-419
lines changed

Some content is hidden

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

66 files changed

+401
-419
lines changed
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://.com/4GeeksAcademy/python-beginner-programming-exercises)
10+
11+
2. [Practice Looping Lists and Tuples](https://.com/4GeeksAcademy/python-lists-loops-programming-exercises)
12+
13+
3. [Practice Functions](https://.com/4GeeksAcademy/python-functions-programming-exercises)
14+
15+
16+
Presiona `Next →` en la esquina superior derecha cuando quieras empezar.
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://.com/4GeeksAcademy/python-beginner-programming-exercises)
10+
11+
2. [Practice Looping Lists and Tuples](https://.com/4GeeksAcademy/python-lists-loops-programming-exercises)
12+
13+
3. [Practice Functions](https://.com/4GeeksAcademy/python-functions-programming-exercises)
14+
15+
Click `Next →` on the top right of this instructions when you are ready to start.
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)
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.
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+
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

File renamed without changes.
File renamed without changes.
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/
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/
File renamed without changes.
File renamed without changes.
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/
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.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# `005` previous and next
2+
3+
## 📝 Instrucciones:
4+
5+
1. Completa la función `previous_next()` para que lea un número entero y devuelva sus números anteriores y siguientes.
6+
7+
## Ejemplo:
8+
9+
```py
10+
previous_next(179)
11+
```
12+
13+
## Ejemplo de salida:
14+
15+
+ (178, 180)
16+
17+
## 💡 Pistas:
18+
19+
+ Puedes devolver múltiples parámetros: return a, b
20+
21+
+ Si no sabes por donde partir este ejercicio, por favor revisa la teoría en esta lección: https://snakify.org/lessons/print_input_numbers/
22+
23+
+ También puedes intentar paso a paso con trozos de la teoría: https://snakify.org/lessons/print_input_numbers/steps/1/
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# `005` previous and next
2+
3+
## 📝 Instructions:
4+
5+
1. Complete a function `previous_next()` that reads an integer number and returns its previous and next numbers.
6+
7+
## Example input:
8+
9+
```py
10+
previous_next(179)
11+
```
12+
## Example output:
13+
14+
+ (178, 180)
15+
16+
## 💡 Hints:
17+
18+
+ You can return multiple parameters: return a, b
19+
20+
+ 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/
21+
22+
+ 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.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# `007` apple sharing
2+
3+
## 📝 Instrucciones:
4+
5+
1. `N` estudiantes cogen `K` manzanas y las distribuyen entre ell@s de manera uniforme. La parte restante (la indivisible) permanece en la cesta. ¿Cuántas manzanas recibirá cada estudiante? y ¿Cuántas manzanas quedarán en la cesta? *Esta función lee los números `N` y `K` y debería devolver la respuesta a ambas preguntas.*
6+
7+
## Ejemplo de entrada:
8+
9+
```py
10+
apple_sharing(6, 50)
11+
```
12+
13+
## Ejemplo de salida:
14+
15+
+ (8, 2)
16+
17+
## 💡 Pistas:
18+
19+
+ Puedes devolver múltiples parámetros: return a, b
20+
21+
+ Si no sabes por donde partir este ejercicio por favor, revisa la teoría en esta lección:
22+
https://snakify.org/lessons/print_input_numbers/
23+
24+
+ También puedes intentar paso a paso con trozos de la teoría:
25+
https://snakify.org/lessons/print_input_numbers/steps/1/
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# `007` apple sharing
2+
3+
## 📝 Instructions:
4+
5+
1. `N` students take `K` apples and distribute them among each other evenly. The remaining (the indivisible) part remains in the basket. How many apples will each single student get and how many apples will remain in the basket? *The function reads the numbers `N` and `K` and it should return the two answers for the questions above.*
6+
7+
## Example input:
8+
9+
```py
10+
apple_sharing(6, 50)
11+
```
12+
13+
## Example output:
14+
15+
+ (8, 2)
16+
17+
18+
## 💡 Hints:
19+
20+
+ You can return multiple parameters: return a, b
21+
22+
+ If you don't know how to start solving this assignment, please, review a theory for this lesson:
23+
https://snakify.org/lessons/print_input_numbers/
24+
25+
+ You may also try step-by-step theory chunks:
26+
https://snakify.org/lessons/print_input_numbers/steps/1/
File renamed without changes.
File renamed without changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# `006.1` square value of number
2+
3+
## 📝 Instrucciones:
4+
5+
1. Escribe una función llamada `square()` que calcule el valor al cuadrado de un número
6+
7+
## 💡 Pista:
8+
9+
+ Usa el operador `**`.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# `006.1` square value of number
2+
3+
## 📝 Instructions
4+
5+
1. Write a function called `square()` that calculates the square value of a number.
6+
7+
## 💡 Hint:
8+
9+
+ Using the `**` operator
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# `008` two timestamps
2+
3+
## 📝 Instrucciones:
4+
5+
1. Dadas dos marcas de tiempo del mismo día: un número de horas, minutos y segundos para ambas marcas de tiempo. El momento de la primera marca de tiempo ocurrió antes del momento de la segunda. Calcula cuántos segundos pasaron entre ellas.
6+
7+
## Ejemplo de entrada #1:
8+
9+
```py
10+
two_timestamp(1,1,1,2,2,2)
11+
```
12+
13+
## Ejemplo de salida #1:
14+
15+
+ 3661
16+
17+
## Ejemplo de entrada #2:
18+
19+
```py
20+
two_timestamp(1,2,30,1,3,20)
21+
```
22+
23+
## Ejemplo de salida #2:
24+
25+
+ 50
26+
27+
## 💡 Pistas:
28+
29+
+ Si no sabes por donde partir este ejercicio por favor, revisa la teoría en esta lección: https://snakify.org/lessons/print_input_numbers/
30+
31+
+ También puedes intentar paso a paso con trozos de la teoría: https://snakify.org/lessons/print_input_numbers/steps/1/

0 commit comments

Comments
 (0)