Skip to content

Commit 356dc4f

Browse files
committed
Merge branch 'main' of github.com:danielhdzr/roadmap-retos-programacion
2 parents afc1a00 + f9d5675 commit 356dc4f

File tree

50 files changed

+6812
-1192
lines changed

Some content is hidden

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

50 files changed

+6812
-1192
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
|43|[GIT GITHUB CLI](./Roadmap/43%20-%20GIT%20GITHUB%20CLI/ejercicio.md)|[📝](./Roadmap/43%20-%20GIT%20GITHUB%20CLI/python/mouredev.py)|[▶️](https://youtu.be/Ct4GKpbqflI)|[👥](./Roadmap/43%20-%20GIT%20GITHUB%20CLI/)
8181
|44|[CUENTA ATRÁS MOUREDEV PRO](./Roadmap/44%20-%20CUENTA%20ATRÁS%20MOUREDEV%20PRO/ejercicio.md)|[📝](./Roadmap/44%20-%20CUENTA%20ATRÁS%20MOUREDEV%20PRO/python/mouredev.py)|[▶️](https://youtu.be/9wsXz4K8Q-4)|[👥](./Roadmap/44%20-%20CUENTA%20ATRÁS%20MOUREDEV%20PRO/)
8282
|45|[GITHUB OCTOVERSE](./Roadmap/45%20-%20GITHUB%20OCTOVERSE/ejercicio.md)|[📝](./Roadmap/45%20-%20GITHUB%20OCTOVERSE/python/mouredev.py)|[▶️](https://youtu.be/yj5ZFT_Xmcs)|[👥](./Roadmap/45%20-%20GITHUB%20OCTOVERSE/)
83-
|46|[X VS BLUESKY](./Roadmap/46%20-%20X%20VS%20BLUESKY/ejercicio.md)|[📝](./Roadmap/46%20-%20X%20VS%20BLUESKY/python/mouredev.py)||[👥](./Roadmap/46%20-%20X%20VS%20BLUESKY/)
83+
|46|[X VS BLUESKY](./Roadmap/46%20-%20X%20VS%20BLUESKY/ejercicio.md)|[📝](./Roadmap/46%20-%20X%20VS%20BLUESKY/python/mouredev.py)|[▶️](https://youtu.be/RzwFGihKpOM)|[👥](./Roadmap/46%20-%20X%20VS%20BLUESKY/)
8484
|47|[CALENDARIO DE ADVIENTO](./Roadmap/47%20-%20CALENDARIO%20DE%20ADVIENTO/ejercicio.md)|[🗓️ 02/12/24](https://discord.gg/mtHpG4md?event=1308551460644065330)||[👥](./Roadmap/47%20-%20CALENDARIO%20DE%20ADVIENTO/)
8585

8686
## Cursos en YouTube
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
public class AriasLopez{
2+
public static void main(String[] args){
3+
4+
//https://www.oracle.com/java/
5+
6+
// Esto es un comentario de una linea
7+
/*
8+
* Esto es un comentario de
9+
* varias lineas
10+
*
11+
*/
12+
13+
int numero = 5;
14+
System.out.println("Esta es una variable de tipo entero: " + numero);
15+
final int constante = 10;
16+
System.out.println("Esta es una constante de tipo entero: " + constante);
17+
18+
// Tipos de datos
19+
20+
int entero = 1; // Tipo int, almacena numeros enteros
21+
float flotante = 2.5f; // Tipo float, almacena numeros decimales
22+
double doble = 15.52; // Tipo double, almacena numeros decimales mas grandes
23+
String cadena = "esto es un texto"; // Tipo String, almacena cadenas de texto
24+
char caracter = 'T'; // Tipo char, almacena un solo carácter
25+
boolean Verdadero = true; // Tipo boolean, retorna un valor verdadero
26+
boolean falso = false; // Tipo boolean, retorna un valor falso
27+
28+
System.out.println("entero: " + entero + ", Flotante: " + flotante + ", Doble: " + doble + ", Cadena: " + cadena + ", Char: " + caracter + ", Verdadero: " + Verdadero + ", Falso: " + falso + ".");
29+
30+
System.out.println("Hola, Java ");
31+
32+
33+
}
34+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// https://developer.mozilla.org/es/docs/Web/JavaScript
2+
3+
// Este es un ejenplo de como hacer comentarios en una sola línea.
4+
5+
/* Para hacer comentarios en varias líneas
6+
se puede hacer de esta manera, se incia con
7+
un slash y un asterisco y se cierra con un asterisco
8+
y un slash
9+
*/
10+
11+
// Creamos una variable y una constante.
12+
13+
let nombre = "Estefrac";
14+
const pulgadas = 2.54;
15+
16+
// Variables representando tipos de datos primitivos.
17+
18+
let texto = "Retos de Programación"; // String
19+
let numEntero = 43; // Number
20+
let numDecimal = 1.23; // Number
21+
let mejorRoadmap = true; // Boolean
22+
let proximasVacaciones; // Undefined
23+
let tiempoLibre = null; // Null
24+
25+
// Imprimir en consola el mensaje "¡Hola, JavaScript!"
26+
27+
console.log("¡Hola, Javascript!");
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?php
2+
3+
// https://www.php.net
4+
5+
// Esta es la primera forma de escribir comentarios con PHP, como una sola linea
6+
/*
7+
Y para escribir lineas multiples se puede usar de esta manera
8+
Así puedo escribir varias lineas sin necesidad de agregar una
9+
doble barra cada vez (y hace el código más legible a veces, a mi parecer)
10+
*/
11+
12+
$varDobl = "Hola, soy una variable de doble comillas";
13+
$varSimpl = 'Y yo de comillas simples!';
14+
const CONSTANTE = "Y yo soy una constante!!";
15+
16+
$lang = "PHP";
17+
18+
19+
// Tipos de datos
20+
21+
$integer = "Esto es una cadena de texto"; // Texto plano
22+
$number = 123; // numérico
23+
$float = 123.45; // flotante (o decimal)
24+
$bool = true; // booleano (también puede ser 'false')
25+
$null = NULL; // null (vacío)
26+
$array = array(
27+
'clave' => 'valor',
28+
'clave2' => 'valor2',
29+
'clave3' => 'valor3',
30+
); // Tipo array
31+
32+
33+
echo "Hola, $lang!"
34+
35+
?>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#Primero tenemos que escribir un comentario, estos comentarios no se ejecutan
2+
3+
"""
4+
Esto es un comentario en varias lineas
5+
No necesito poner un # para cada linea de código
6+
7+
"""
8+
9+
#Crea una variable y una constante
10+
11+
mi_variable = "hola mundo"
12+
13+
mi_variable = "Esto es un enlace"
14+
15+
MI_CONSTANTE = "No puede cambiar" #No existen constantes en Python. Pero se pone en mayusculas para que no cambiar el valor.
16+
17+
18+
19+
#Crear variables con todos los tipos de datos. Datos primitivos del lenguaje
20+
21+
mi_booleano = True
22+
mi_string = "Soy un string"
23+
my_int = 30
24+
my_float = 1.70 #variable de tipo decimal
25+
26+
print("Hola Python")
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
public class AriasLopez01 {
2+
3+
/**
4+
* @param args
5+
*/
6+
public static void main(String[] args) {
7+
8+
9+
/*
10+
* OPERADORES ARITMETICOS
11+
*/
12+
System.out.println("Esta es una suma, 5 + 2 = " + (5 + 2));
13+
System.out.println("Esta es una resta, 5 - 2 = " + (5 - 2));
14+
System.out.println("Esta es una multiplicacion, 5 * 2 = " + (5 * 2));
15+
System.out.println("Esta es una division, 5 / 2 = " + (5 / 2));
16+
System.out.println("Esto es un modulo, 5 % 2 = " + (5 % 2));
17+
18+
// OPERADORES RELACIONALES
19+
20+
System.out.println("5 IGUAL 10 = " + (5 == 10));
21+
System.out.println("5 DESIGUALDAD 10 = " + (5 != 10));
22+
System.out.println("5 MENOR QUE 10 = " + (5 < 10));
23+
System.out.println("5 MAYOR QUE 10 = " + (5 > 10));
24+
System.out.println("5 MAYOR O IGUAL QUE 10 = " + (5 >= 10));
25+
System.out.println("5 MENOR O IGUAL QUE 10 = " + (5 <= 10));
26+
System.out.println("10 MAYOR O IGUAL QUE 10 = " + (10 >= 10));
27+
28+
// OPERADORES LOGICOS
29+
30+
System.out.println("&& AND: 3 < 8 AND 5 < 7 (" + ((3 < 8) && (5 < 7)) + ")");
31+
System.out.println("&& AND: 3 <= 3 AND 5 == 7 (" + (3 <= 3 && 5 == 7) + ")");
32+
System.out.println("|| OR: 3 + 3 = 8 || 2 < 4 (" + (3 + 3 == 8 || 2 < 4) + ")");
33+
System.out.println("|| OR: 3 + 3 = 8 || 2 > 7 (" + (3 + 3 == 8 || 2 > 7) + ")");
34+
System.out.println("! NOT: 3 + 7 = 8 (" + !(3 + 7 == 8 ) + ")");
35+
System.out.println("! NOT: 3 < 8 (" + !(3 < 8 ) + ")");
36+
37+
38+
// OPERADORES DE ASIGNACION
39+
40+
int numero1 = 10;
41+
System.out.println(numero1);
42+
43+
numero1 += 2;
44+
System.out.println(numero1);
45+
46+
numero1 -= 1;
47+
System.out.println(numero1);
48+
49+
numero1 *= 10;
50+
System.out.println(numero1);
51+
52+
numero1 %= 8;
53+
System.out.println(numero1);
54+
55+
numero1 /= 2;
56+
System.out.println(numero1);
57+
58+
numero1 ^= 10;
59+
System.out.println(numero1);
60+
61+
62+
/*
63+
* ESTRUCTURAS DE CONTROL
64+
*/
65+
66+
int edad = 6;
67+
68+
if (edad >= 18 ) {
69+
System.out.println("Es mayor de edad, puede viajar solo.");
70+
} else if (edad <=5) {
71+
System.out.println("Aun es un bebe, debe ir acompañado y no paga el pasaje.");
72+
} else {
73+
System.out.println("El pasajero debe ir acompañado.");
74+
}
75+
76+
77+
78+
for (int i = 0; i <= 18; i++){
79+
System.out.println(i);
80+
}
81+
82+
83+
for (int i = 0; i <= 56; i++){
84+
if (i %2 == 0 && i != 16 && i %3 == 0 ) {
85+
System.out.println(i);
86+
}
87+
}
88+
}
89+
90+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
# Function Without Parameters
2+
print("\nFunction Without Parameters")
3+
def function_without_parametars():
4+
print("I'm a function")
5+
function_without_parametars()
6+
7+
8+
# Function With One Parameter
9+
print("\nFunction With One Parameter")
10+
def function_with_one_parameter(name):
11+
print(f"Hello, {name}")
12+
function_with_one_parameter("Reggie")
13+
14+
15+
# Function With Default Parameters
16+
print("\nFunction With Default Parameters")
17+
def function_with_default_parameters(name = "Samantha"):
18+
print(f"Hello, {name}")
19+
function_with_default_parameters()
20+
21+
22+
# Function With Multiple Parameters
23+
print("\nFunction With Multiple Parameters")
24+
def function_with_multiple_parameters(name, age):
25+
print(f"{name} is {age} year old")
26+
function_with_multiple_parameters("Carl", 40)
27+
28+
29+
# Function With Return Value
30+
print("\nFunction With Return Value")
31+
def function_with_return_value(a, b) -> int:
32+
return a * b
33+
return_value = function_with_return_value(20, 40)
34+
print(return_value)
35+
36+
37+
# Function With Variable Number of Parameters
38+
print("\nFunction With Variable Number of Parameters")
39+
def function_with_variable_number_of_parameters(*parameters):
40+
print(parameters)
41+
function_with_variable_number_of_parameters("a", "e", "i", "o", "u")
42+
43+
44+
## Funciton with Variable Parameters key Value
45+
print("\nFunciton with Variable Parameters key Value")
46+
def function_with_variable_key_value_parameters(**user_data):
47+
for key, value in user_data.items():
48+
print(f"{key}: {value}")
49+
function_with_variable_key_value_parameters(name="Tamy", age=32, city="New York")
50+
51+
52+
# Function Inside a Function
53+
print("\nFunction Inside a Function")
54+
def function_insede_the_function():
55+
print("I'm a main function.")
56+
def second_function():
57+
print("I'm a function inside other function")
58+
second_function()
59+
function_insede_the_function()
60+
61+
62+
# Function With Function as Parameter
63+
print("\nFunction With Function as Parameter")
64+
def function_with_function_as_parameter(function, a, b):
65+
print(function(a, b))
66+
function_with_function_as_parameter(lambda a, b: a + b, 4, 10)
67+
68+
69+
# Sistem Function
70+
print("\nSistem Function")
71+
tuple = (1, 2, 3)
72+
list = list(tuple)
73+
print(sum(list))
74+
75+
76+
# Global Variable
77+
print("\nGlobal Variable")
78+
global_variable = 100
79+
def Function_with_global_variable():
80+
# Local Variable
81+
print(f"The global variable value is: {global_variable}")
82+
Function_with_global_variable()
83+
84+
# Local Variable
85+
print("\nLocal Variable")
86+
def function_with_local_variable():
87+
local_variable = 200
88+
print(f"The local variable value is: {local_variable}")
89+
function_with_local_variable()
90+
91+
92+
93+
94+
##############################################################
95+
96+
# Extra Difficulty
97+
print("\nExtra Difficulty")
98+
99+
def multiples_by_word(w1="Hello", w2="World"):
100+
counter = 0
101+
102+
for number in range(0, 101):
103+
if number % 3 == 0 and number % 5 == 0:
104+
print(w1 + " " + w2)
105+
elif number % 3 == 0:
106+
print(w2)
107+
elif number % 5 == 0:
108+
print(w2)
109+
else:
110+
counter += 1
111+
print(number)
112+
113+
return counter
114+
multiples_by_word()
115+
print(f"The number appear {multiples_by_word()} times")

0 commit comments

Comments
 (0)