Skip to content

Commit 3e43b87

Browse files
committed
Merge branch '#3-Python' of github.com:Gordo-Master/roadmap-retos-programacion into #3-Python
2 parents 1f03fea + 02fd2f1 commit 3e43b87

File tree

95 files changed

+10821
-1109
lines changed

Some content is hidden

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

95 files changed

+10821
-1109
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
2828
## Corrección y próximo ejercicio
2929

30-
> #### Lunes 1 de julio de 2024 a las 20:00 (hora España) desde **[Twitch](https://twitch.tv/mouredev)**
31-
> #### Consulta el **[horario](https://discord.gg/CPKcDD9d?event=1252321976027054111)** por país y crea un **[recordatorio](https://discord.gg/CPKcDD9d?event=1252321976027054111)**
30+
> #### Lunes 8 de julio de 2024 a las 20:00 (hora España) desde **[Twitch](https://twitch.tv/mouredev)**
31+
> #### Consulta el **[horario](https://discord.gg/4azkvPUJ?event=1254974320136949871)** por país y crea un **[recordatorio](https://discord.gg/4azkvPUJ?event=1254974320136949871)**
3232
3333
## Roadmap
3434

@@ -60,7 +60,8 @@
6060
|23|[SINGLETON](./Roadmap/23%20-%20SINGLETON/ejercicio.md)|[📝](./Roadmap/23%20-%20SINGLETON/python/mouredev.py)|[▶️](https://youtu.be/cOIcFo_w9hA)|[👥](./Roadmap/23%20-%20SINGLETON/)
6161
|24|[DECORADORES](./Roadmap/24%20-%20DECORADORES/ejercicio.md)|[📝](./Roadmap/24%20-%20DECORADORES/python/mouredev.py)|[▶️](https://youtu.be/jxJOjg7gPG4)|[👥](./Roadmap/24%20-%20DECORADORES/)
6262
|25|[LOGS](./Roadmap/25%20-%20LOGS/ejercicio.md)|[📝](./Roadmap/25%20-%20LOGS/python/mouredev.py)|[▶️](https://youtu.be/y2O6L1r_skc)|[👥](./Roadmap/25%20-%20LOGS/)
63-
|26|[SOLID: PRINCIPIO DE RESPONSABILIDAD ÚNICA](./Roadmap/26%20-%20SOLID%20SRP/ejercicio.md)|[🗓️ 01/07/24](https://discord.gg/CPKcDD9d?event=1252321976027054111)||[👥](./Roadmap/26%20-%20SOLID%20SRP/)
63+
|26|[SOLID: PRINCIPIO DE RESPONSABILIDAD ÚNICA](./Roadmap/26%20-%20SOLID%20SRP/ejercicio.md)|[📝](./Roadmap/26%20-%20SOLID%20SRP/python/mouredev.py)||[👥](./Roadmap/26%20-%20SOLID%20SRP)
64+
|27|[SOLID: PRINCIPIO ABIERTO-CERRADO](./Roadmap/27%20-%20SOLID%20OCP/ejercicio.md)|[🗓️ 08/07/24](https://discord.gg/4azkvPUJ?event=1254974320136949871)||[👥](./Roadmap/27%20-%20SOLID%20OCP/)
6465

6566
## Instrucciones
6667

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
package main
2+
3+
// Comentario de una línea - comienza con // y van hasta el final de la línea
4+
/*
5+
Comentarios generales - comienzan con /* y terminan con
6+
*/
7+
8+
// Sitio oficial: https://go.dev/
9+
10+
import (
11+
"fmt"
12+
)
13+
14+
var lenguaje = "Go" // Tipo implicito string
15+
16+
func main() {
17+
/*
18+
Declaración de variables
19+
20+
var nombreVariable Tipo
21+
var nombreVariable Tipo = valor
22+
23+
Declaración corta de variables - solo funciona dentro de funciones
24+
25+
nombreVariable := valor // El tipo es implicito
26+
*/
27+
variable := 0
28+
fmt.Println(variable)
29+
30+
// Booleanas
31+
var verdadero, falso bool = true, false
32+
fmt.Println(verdadero)
33+
fmt.Println(falso)
34+
35+
// Numéricas
36+
/*
37+
uint
38+
uint8 the set of all unsigned 8-bit integers (0 to 255)
39+
uint16 the set of all unsigned 16-bit integers (0 to 65535)
40+
uint32 the set of all unsigned 32-bit integers (0 to 4294967295)
41+
uint64 the set of all unsigned 64-bit integers (0 to 18446744073709551615)
42+
43+
byte // alias for uint8
44+
45+
int
46+
int8 the set of all signed 8-bit integers (-128 to 127)
47+
int16 the set of all signed 16-bit integers (-32768 to 32767)
48+
int32 the set of all signed 32-bit integers (-2147483648 to 2147483647)
49+
int64 the set of all signed 64-bit integers (-9223372036854775808 to 9223372036854775807)
50+
51+
rune // alias for int32
52+
// represents a Unicode code point
53+
54+
float32 the set of all IEEE-754 32-bit floating-point numbers
55+
float64 the set of all IEEE-754 64-bit floating-point numbers
56+
57+
complex
58+
complex64 the set of all complex numbers with float32 real and imaginary parts
59+
complex128 the set of all complex numbers with float64 real and imaginary parts
60+
*/
61+
var entero int8 = -5
62+
fmt.Println(entero)
63+
64+
var enteroSinSigno uint8 = 0
65+
fmt.Println(enteroSinSigno)
66+
67+
var flotante float32 = 1.2525
68+
fmt.Println(flotante)
69+
70+
var complejo complex64 = 4 + 1i
71+
fmt.Println(complejo)
72+
73+
// Cadenas
74+
var saludo string = "Hola"
75+
fmt.Println(saludo)
76+
77+
// Arrays
78+
arreglo := [3]int{1, 2, 3}
79+
var pow = []int{1, 2, 4, 8, 16, 32, 64, 128}
80+
fmt.Println(arreglo)
81+
fmt.Println(pow)
82+
83+
// Constantes
84+
const pi float64 = 3.14159265
85+
fmt.Println(pi)
86+
87+
// Punteros
88+
var p *int
89+
i := 42
90+
p = &i
91+
fmt.Println(*p)
92+
93+
fmt.Printf("!%s, %s!", saludo, lenguaje)
94+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package main
2+
3+
import "fmt"
4+
5+
func main() {
6+
// comentario
7+
8+
/*
9+
comentario
10+
multiples
11+
lineas
12+
*/
13+
const language string = "gOlAng"
14+
VarInt := 10
15+
VarFloat := 10.486485688
16+
VarBool := true
17+
VarString := "esto es un String"
18+
fmt.Printf("Variable Entera : %d\n", VarInt)
19+
fmt.Printf("Variable Float : %.2f\n", VarFloat)
20+
fmt.Printf("Variable Boolean : %v\n", VarBool)
21+
fmt.Printf("ariable String : %s\n", VarString)
22+
fmt.Println("Hello " + language)
23+
24+
}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
public class Fluna29 {
2+
public static void main(String[] args) throws Exception {
3+
/**
4+
* Coloco aqui el link de Java pero no de la página de descarga, sino de la pagina que tiene la documentación de Java
5+
* https://docs.oracle.com/en/java/
6+
*
7+
* Por cierto esto es un comentario en varias lineas
8+
*/
9+
10+
//Y a partir de ahora voy a escribir comentarios de una sola linea, al igual que este mismo
11+
12+
//Esto es una variable
13+
var nombre = "El caballo es de color gris";
14+
15+
//Esto es una constante
16+
final double PI = 3.1416;
17+
18+
19+
//A continuación voy a escribir los tipos primitivos de variables para numeros
20+
21+
byte bite = 1;
22+
short corto = 2;
23+
int entero = 3;
24+
long largo = 4;
25+
float flotante = 5.5f;
26+
double numDecimal = 6.6;
27+
28+
//El tipo primitivo de texto sería Char, ya que String es un tipo de dato de referencia porque hacen referencia a objetos
29+
char caracter = 'a';
30+
31+
//El tipo primitivo de booleano es boolean
32+
boolean dormido = true;
33+
34+
35+
//Por último vamos a saludar a nuestro lenguaje de programación
36+
System.out.println("Hola, Java!");
37+
38+
39+
}
40+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
public class marce1084 {
2+
public static void main(String[] args) {
3+
//https://www.java.com/es/
4+
5+
//Esto es un comentario simple
6+
7+
/*Esto tambien es un
8+
* comentario de
9+
* varias lineas
10+
*/
11+
12+
String nombre = "Ariel"; //Variable
13+
14+
int valor = 253; //Constante
15+
16+
//Datos primitivos
17+
int num1 = 23784;
18+
double num2 = 56.54;
19+
float num3 = 23.4f;
20+
byte num4 = 12;
21+
short num5 = 124;
22+
long num6 = 891293;
23+
char letra7 = 'A';
24+
boolean valor8 = true;
25+
String frase9 = "Hola a todos";
26+
27+
System.out.println("¡Hola, Java!");
28+
29+
}
30+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
// Sitio oficial JavaScript: https://developer.mozilla.org/es/docs/Web/JavaScript
2+
3+
// 1. Comentarios
4+
5+
// Comentario de una línea
6+
7+
/*
8+
Comentario
9+
de
10+
varias
11+
líneas
12+
*/
13+
14+
// 2. Variables
15+
16+
// Declaración de variables
17+
var x = 5;
18+
let y = 10;
19+
const z = 15;
20+
21+
// 3. Tipos de datos
22+
let a = 5; // Number
23+
let b = "Hola"; // String
24+
let c = true; // Boolean
25+
let d = [1, 2, 3]; // Array
26+
let e = {nombre: "Albrox", edad: 25}; // Object
27+
28+
// 4. Hola mundo
29+
let language = "JavaScript";
30+
console.log("Hola mundo desde " + language + "!");
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
/*
2+
EJERCICIO:
3+
* 1- Crea un comentario en el código y coloca la URL del sitio web oficial del
4+
* lenguaje de programación que has seleccionado.
5+
* 2- Representa las diferentes sintaxis que existen de crear comentarios
6+
* en el lenguaje (en una línea, varias...).
7+
* 3- Crea una variable (y una constante si el lenguaje lo soporta).
8+
* 4- Crea variables representando todos los tipos de datos primitivos
9+
* del lenguaje (cadenas de texto, enteros, booleanos...).
10+
* 5- Imprime por terminal el texto: "¡Hola, [y el nombre de tu lenguaje]!"
11+
* */
12+
13+
// 1- Crea un comentario en el código y coloca la URL del sitio web oficial del lenguaje de programación que has seleccionado.
14+
15+
// https://www.javascript.com/
16+
17+
//___________________________//
18+
19+
// 2- Representa las diferentes sintaxis que existen de crear comentarios en el lenguaje (en una línea, varias...).
20+
21+
// Comentario en una sola linea
22+
23+
/*
24+
Comentario de
25+
multiples lineas
26+
*/
27+
28+
//___________________________//
29+
30+
// 3- Crea una variable (y una constante si el lenguaje lo soporta).
31+
32+
let edad = 35;
33+
34+
const nombre = "andy";
35+
36+
//___________________________//
37+
38+
//4- Crea variables representando todos los tipos de datos primitivos del lenguaje (cadenas de texto, enteros, booleanos...).
39+
40+
// 1) Number
41+
42+
let entero = 12;
43+
let flotante = 5.14;
44+
45+
// 2) String
46+
47+
let objeto = "carro";
48+
let color = 'rojo';
49+
let plantilla = `El ${objeto} es ${color}`;
50+
console.log(plantilla); // El carro es rojo
51+
52+
// 3) Boolean
53+
54+
let verdadero = true;
55+
let falso = false;
56+
57+
// 4) Undefined
58+
59+
let fruta;
60+
61+
console.log(fruta)//undefined
62+
63+
// 5) Null
64+
65+
let nulo = null;
66+
67+
//6) Symbol
68+
69+
let simbolo = Symbol('datos');
70+
71+
// 7) BigInt
72+
73+
let bigboy = BigInt(345234623563245623562362346234652354623546);
74+
75+
let bigGirl = 5234562346234623456234562345623465234n;
76+
77+
// 5 - Imprime por terminal el texto: "¡Hola, [y el nombre de tu lenguaje]!"
78+
79+
console.log("!hola, JavaScript");

0 commit comments

Comments
 (0)