Skip to content

Commit

Permalink
Merge branch 'mouredev:main' into #16-Python
Browse files Browse the repository at this point in the history
  • Loading branch information
Gordo-Master authored Sep 10, 2024
2 parents 0bbff7f + 3320048 commit 47a0515
Show file tree
Hide file tree
Showing 44 changed files with 6,652 additions and 1,064 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
## Corrección y próximo ejercicio

> #### Lunes 9 de septiembre de 2024 a las 20:00 (hora España) desde **[Twitch](https://twitch.tv/mouredev)**
> #### Consulta el **[horario](https://discord.gg/7A9NDvrb?event=1277739431696138385)** por país y crea un **[recordatorio](https://discord.gg/7A9NDvrb?event=1277739431696138385)**
> #### Lunes 16 de septiembre de 2024 a las 20:00 (hora España) desde **[Twitch](https://twitch.tv/mouredev)**
> #### Consulta el **[horario](https://discord.gg/8cxgGTxm?event=1280229634524450877)** por país y crea un **[recordatorio](https://discord.gg/8cxgGTxm?event=1280229634524450877)**
## Roadmap

Expand Down Expand Up @@ -70,7 +70,8 @@
|33|[RESCATANDO A MICKEY](./Roadmap/33%20-%20RESCATANDO%20A%20MICKEY/ejercicio.md)|[📝](./Roadmap/33%20-%20RESCATANDO%20A%20MICKEY/python/mouredev.py)|[▶️](https://youtu.be/Bo9Cp3N68C0)|[👥](./Roadmap/33%20-%20RESCATANDO%20A%20MICKEY/)
|34|[ÁRBOL GENEALÓGICO DE LA CASA DEL DRAGÓN](./Roadmap/34%20-%20ÁRBOL%20GENEALÓGICO%20LA%20CASA%20DEL%20DRAGÓN/ejercicio.md)|[📝](./Roadmap/34%20-%20ÁRBOL%20GENEALÓGICO%20LA%20CASA%20DEL%20DRAGÓN/python/mouredev.py)|[▶️](https://youtu.be/GAHBOAzgE2w)|[👥](./Roadmap/34%20-%20ÁRBOL%20GENEALÓGICO%20LA%20CASA%20DEL%20DRAGÓN/)
|35|[REPARTIENDO LOS ANILLOS DE PODER](./Roadmap/35%20-%20REPARTIENDO%20LOS%20ANILLOS%20DE%20PODER/ejercicio.md)|[📝](./Roadmap/35%20-%20REPARTIENDO%20LOS%20ANILLOS%20DE%20PODER/python/mouredev.py)|[▶️](https://youtu.be/10i2dnaMLj8)|[👥](./Roadmap/35%20-%20REPARTIENDO%20LOS%20ANILLOS%20DE%20PODER/)
|36|[EL SOMBRERO SELECCIONADOR](./Roadmap/36%20-%20EL%20SOMBRERO%20SELECCIONADOR/ejercicio.md)|[🗓️ 09/09/24](https://discord.gg/7A9NDvrb?event=1277739431696138385)||[👥](./Roadmap/36%20-%20EL%20SOMBRERO%20SELECCIONADOR/)
|36|[EL SOMBRERO SELECCIONADOR](./Roadmap/36%20-%20EL%20SOMBRERO%20SELECCIONADOR/ejercicio.md)|[📝](./Roadmap/36%20-%20EL%20SOMBRERO%20SELECCIONADOR/python/mouredev.py)||[👥](./Roadmap/36%20-%20EL%20SOMBRERO%20SELECCIONADOR/)
|37|[OASIS VS LINKIN PARK](./Roadmap/37%20-%20OASIS%20VS%20LINKIN%20PARK/ejercicio.md)|[🗓️ 16/09/24](https://discord.gg/8cxgGTxm?event=1280229634524450877)||[👥](./Roadmap/37%20-%20OASIS%20VS%20LINKIN%20PARK/)

## Cursos en YouTube

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
https://www.cprogramming.com

Types of comments
// // = // comment //
/* */ = /* comment */

// constant value = const + type of variable + name of variable //
const int n = 5;

//Data types //
char character = 'a'; // Single character, 1 byte //
int integer = 9; // Signed integer in base 10, 4 bytes//
float decimal = 1.5; // Floating point number with six digits of precision, 4 bytes //
double decimalDouble = -2456.4452; // Hold about 15 to 16 digits after and before any given decimal point, 8 bytes //
long longinteger = 132344546L; // Signed long integer, 4 bytes //
short shortinteger = 128; // Short signed integer, 2 bytes //
unsigned unsignedinteger = 50; // Unsigned integer in base 10, 4 bytes //
unsigned long unsignedlonginteger = 451345245UL; // Unsigned long long integer, 8 bytes //
unsigned short unsignedshortinteger = 256; // Short unsigned integer, 2 bytes //

#include <stdio.h> // header function

int main() // main function
{ // indicates the beginning and end of functions and other code blocks //
char l_name = 'C'; // create a variable named l_name and assign it the character C //

printf("!Hola %c!\n", l_name); // print the string !Hola + variable l_name// // %c indicates that the funtion is printing a character// // \n print another line//

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@

public class queralesDev {
public static void main(String[] args) {
/*
https://www.java.com/es/
*/

/*
Las diferentes sintaxis para crear comentarios son las siguientes
/* Esto es Comentario de varias lineas
//comentario de una sola linea
///comentario de una sola linea tambien
*/

int numeroEntero;
String JAVA = "Soy una constante";

byte numero;
int numeroEntero2;
short numeroCorto;
long numeroLargo;
double numeroConComa;
char caracter;
float numeroConComa2;

System.out.printf("Hola soy java");

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// https://developer.mozilla.org/es/docs/Web/JavaScript

// comentarios de una sola linea
/*comentarios
de varias lineas*/

let variable;
const constante = 5;

let number = 1;
let string = 'string';
let boolean = true;
let array = [1,2,3];

console.log("Hola Javascript");
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# 1.Crea un comentario en el código y coloca la URL del sitio web oficial del lenguaje de programación que has seleccionado.
# Empezamos de cero!

# https://www.python.org

"""
Este es
un comentario
en 3 lineas
"""
# 2.Crea una variable (y una constante si el lenguaje lo soporta).
variable = "Mi Variable"
MY_CONSTANT = "Constante" # Esta constante puede mutar, pero al estar en mayusculas, por convencion nadie la deberia de cambiar

# 3.Crea variables representando todos los tipos de datos primitivos
int_var = 7
float_var = 2.5
bool_var = True
bool2_var = False
string_var = "Cadena de texto"
string2_var = 'Cadena de texto con comilla simple'

# 4.Imprime por terminal el texto: "¡Hola, [y el nombre de tu lenguaje]!"

YO = "Dkp-Dev!"
PYTHON = "Python!!"

print("Hola", PYTHON, "soy ",YO)
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Parte 1.
# https://www.python.org/

# Parte 2.
# Esto es un primer comentario.

"""
Otra forma de realizar
comentarios de varias líneas.
"""

# Parte 3.
mi_primera_variable = 3
HORAS_DIA = 24

# Parte 4.
numero_entero = 54
numero_decimal = 43.2
cadena_texto = "Hola mundo"
variable_booleana = True
variable_none = None

print("¡Hola, Python!")
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#https://www.python.org/
#1. Sintaxis de creacion de comentarios
#1.1. Para una sola linea se utilizan los numerales (#)
"""
1.2. Comentar varias lineas: Se utilizan las comillas dobles o simples triples
"""
'''
1.2. Comentar varias lineas: Se utilizan las comillas dobles o simples triples
'''
#2. Crea una variable y una constante si el lenguaje lo soporta
mi_variable = 69

#2.1. Costante
PI = 3.1416

#3. Tipos de datos

cadena = "string" #Cadena de texto (str)
numero_entero = 10 # Numero entero (int)
numero_flotante = 3.5 # Numero flotante (float)
booleano = True # Valor booleano (bool)
lista = [1,2,3] # Lista (list)
tupla = (1,2,3) # tupla (tuple)
diccionario = {"clave" : "valor"} #Diccionario (dict)

nombre_lenguaje = "Python"
print(f"¡Hola, {nombre_lenguaje}!")


Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# https://www.python.org/

# Comentario de una linea

'''
# Comentario multi lineas
# Segunda linea de comentario
'''

# Variable en Python
primera_variable = 0

# Constante en Python
DURACION_MILISEGUNDOS = 300

# Tipos de datos primitivos
variable_string_comillas_simples = 'String de comillas simples'
Variable_string_comillas_dobles = "String de comillas dobles"
variable_int = 3600
variable_float = 5.5
variable_boolean = True
variable_nula = None

print("¡Hola Python!")
136 changes: 136 additions & 0 deletions Roadmap/01 - OPERADORES Y ESTRUCTURAS DE CONTROL/c++/oixild.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
/*
* EJERCICIO:
* - Crea ejemplos utilizando todos los tipos de operadores de tu lenguaje:
* Aritméticos, lógicos, de comparación, asignación, identidad, pertenencia, bits...
* (Ten en cuenta que cada lenguaje puede poseer unos diferentes)
* - Utilizando las operaciones con operadores que tú quieras, crea ejemplos
* que representen todos los tipos de estructuras de control que existan
* en tu lenguaje:
* Condicionales, iterativas, excepciones...
* - Debes hacer print por consola del resultado de todos los ejemplos.
*
* Seguro que al revisar detenidamente las posibilidades has descubierto algo nuevo.
*/


#include <iostream>
#include <vector>
#include <exception> // Para manejo de excepciones

using namespace std;

int main() {
// ** Operadores aritméticos **
int a = 10;
int b = 3;

cout << "Operadores aritméticos:" << endl;
cout << "Suma: " << a + b << endl; // Suma
cout << "Resta: " << a - b << endl; // Resta
cout << "Multiplicación: " << a * b << endl; // Multiplicación
cout << "División: " << a / b << endl; // División
cout << "Módulo: " << a % b << endl; // Módulo
cout << "Incremento: " << ++a << endl; // Incremento
cout << "Decremento: " << --b << endl; // Decremento

// ** Operadores de asignación **
cout << "\nOperadores de asignación:" << endl;
a = 5;
cout << "a = 5 -> " << a << endl;
a += 2;
cout << "a += 2 -> " << a << endl;
a -= 1;
cout << "a -= 1 -> " << a << endl;
a *= 3;
cout << "a *= 3 -> " << a << endl;
a /= 2;
cout << "a /= 2 -> " << a << endl;
a %= 3;
cout << "a %= 3 -> " << a << endl;

// ** Operadores de comparación **
cout << "\nOperadores de comparación:" << endl;
cout << "a == b: " << (a == b) << endl; // Igualdad
cout << "a != b: " << (a != b) << endl; // Diferente
cout << "a < b: " << (a < b) << endl; // Menor que
cout << "a > b: " << (a > b) << endl; // Mayor que
cout << "a <= b: " << (a <= b) << endl; // Menor o igual que
cout << "a >= b: " << (a >= b) << endl; // Mayor o igual que

// ** Operadores lógicos **
cout << "\nOperadores lógicos:" << endl;
bool x = true;
bool y = false;
cout << "x && y: " << (x && y) << endl; // AND lógico
cout << "x || y: " << (x || y) << endl; // OR lógico
cout << "!x: " << !x << endl; // NOT lógico

// ** Operadores de bits **
cout << "\nOperadores de bits:" << endl;
int c = 5; // 0101 en binario
int d = 9; // 1001 en binario
cout << "c & d: " << (c & d) << endl; // AND a nivel de bits
cout << "c | d: " << (c | d) << endl; // OR a nivel de bits
cout << "c ^ d: " << (c ^ d) << endl; // XOR a nivel de bits
cout << "~c: " << ~c << endl; // NOT a nivel de bits
cout << "c << 1: " << (c << 1) << endl; // Desplazamiento a la izquierda
cout << "c >> 1: " << (c >> 1) << endl; // Desplazamiento a la derecha

// ** Estructuras de control: Condicionales **
cout << "\nEstructuras de control - Condicionales:" << endl;
if (a > b) {
cout << "a es mayor que b" << endl;
}
else {
cout << "a no es mayor que b" << endl;
}

// ** Estructuras de control: Iterativas **
cout << "\nEstructuras de control - Iterativas:" << endl;
cout << "Bucle for:" << endl;
for (int i = 0; i < 3; i++) {
cout << "i = " << i << endl;
}

cout << "Bucle while:" << endl;
int i = 0;
while (i < 3) {
cout << "i = " << i << endl;
i++;
}

cout << "Bucle do-while:" << endl;
i = 0;
do {
cout << "i = " << i << endl;
i++;
} while (i < 3);

// ** Estructuras de control: Manejo de excepciones **
cout << "\nEstructuras de control - Excepciones:" << endl;
try {
int divisor = 0;
if (divisor == 0) {
throw runtime_error("Error: División entre cero");
}
int resultado = 10 / divisor;
cout << "Resultado: " << resultado << endl;
}
catch (const exception& e) {
cout << e.what() << endl;
}

// ** Dificultad Extra **
cout << "\nDificultad Extra:" << endl;

int num = 10;
while (num <= 55) {
if (num % 2 == 0 && num % 3 != 0 && num % 16 != 0) {
cout << num << " " << endl;
num++;
}
num++;
}
return 0;
}
Loading

0 comments on commit 47a0515

Please sign in to comment.