forked from mouredev/roadmap-retos-programacion
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'mouredev:main' into main
- Loading branch information
Showing
429 changed files
with
51,899 additions
and
1,787 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
*.xml | ||
*.iml | ||
*.json | ||
*.csv | ||
!stats.json | ||
.DS_Store | ||
.idea/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
76 changes: 76 additions & 0 deletions
76
Roadmap/00 - SINTAXIS, VARIABLES, TIPOS DE DATOS Y HOLA MUNDO/c#/ProTpuS98.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace PracticasLogicaProgramacion | ||
{ | ||
internal class Program | ||
{ | ||
static void Main(string[] args) | ||
{ | ||
//EJERCICIOS | ||
//1. Crea un comentario en el código y coloca la URL del | ||
//sitio web oficial del lenguaje de programación que has seleccionado. | ||
|
||
https://learn.microsoft.com/en-us/dotnet/csharp/ | ||
|
||
//2. Representa las diferentes sintaxis que existen de crear comentarios | ||
//en el lenguaje (en una línea, varias...). | ||
|
||
//Este se utiliza para escribir comentarios de una sola linea. | ||
/* | ||
este se utiliza para escribir comentarios de varias lineas. | ||
*/ | ||
|
||
//3. Crea una variable (y una constante si el lenguaje lo soporta). | ||
|
||
private int num; | ||
private const int numConst; | ||
|
||
//4. Crea variables representando todos los tipos de datos primitivos | ||
//del lenguaje (cadenas de texto, enteros, booleanos...). | ||
|
||
//1. Enteros | ||
private int num1; //numeros enteros de 32 bits. | ||
private long num2; //numeros enteros de 64 bits. | ||
private short num3; //numeros enteros de 16 bits. | ||
private byte num4; //numeros enteros sin signo de 8 bits. | ||
private sbyte num5; //numeros enteros con signo de 8 bits. | ||
private uint num6; //numeros enteros sin signo de 32 bits, | ||
private ulong num7; //numeros enteros sin signo de 64 bits. | ||
private ushort num8; //numeros enteros sin signo de 16 bits. | ||
|
||
//2. Float | ||
private float num9; //Números de punto flotante de precisión simple (32 bits). | ||
private double num10; //Números de punto flotante de doble precisión (64 bits). | ||
|
||
//3. Decimal | ||
private decimal num11; //Números decimales de alta precisión, generalmente usados para cálculos financieros (128 bits). | ||
|
||
//4. Booleanos | ||
bool jump; // Representa valores booleanos (true o false). | ||
|
||
//5. Caracteres | ||
private char Caracter; //Representa un carácter Unicode UTF-16 (16 bits). | ||
|
||
//6. Cadenas | ||
private string name; //Secuencia de caracteres Unicode. | ||
|
||
//5. Imprime por terminal el texto: "¡Hola, [y el nombre de tu lenguaje]!" | ||
EJERCICIO ejercicio = new EJERCICIO(); | ||
ejercicio.saludo(); | ||
|
||
} | ||
public class EJERCICIOS | ||
{ | ||
public void Saludo() | ||
{ | ||
Console.WriteLines("¡Hola, [C#]!") | ||
} | ||
|
||
} | ||
} | ||
} | ||
|
32 changes: 32 additions & 0 deletions
32
Roadmap/00 - SINTAXIS, VARIABLES, TIPOS DE DATOS Y HOLA MUNDO/c++/oixild.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
|
||
|
||
// WEBSITE> https://isocpp.org/ | ||
|
||
// Code comments can be made by different ways : | ||
|
||
// Line Comment | ||
|
||
/* | ||
Block | ||
Comment | ||
*/ | ||
#include <iostream> | ||
|
||
void varConstVar() { | ||
int var = 1; | ||
const int constVar = 2; | ||
} | ||
|
||
void primitiveData() { | ||
int a = 0; | ||
float b = 1.5; | ||
double float c = 2.5; | ||
char d = 'a'; | ||
bool e = true; | ||
wchar_t f = L'C'; | ||
} | ||
|
||
int main() { | ||
std::cout << "¡Hola, [C++]!" << std::endl; | ||
return 0; | ||
} |
42 changes: 42 additions & 0 deletions
42
Roadmap/00 - SINTAXIS, VARIABLES, TIPOS DE DATOS Y HOLA MUNDO/c++/whiterunjarl.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#include <iostream> | ||
using namespace std; | ||
|
||
// la web oficial es: https://isocpp.org/ | ||
|
||
/* otra forma de | ||
comentar */ | ||
|
||
//comentario de una linea | ||
|
||
|
||
int vida = 52; | ||
string perros = "doce"; | ||
double flotante = 22; | ||
char letra = 'N'; | ||
bool falsito = false; | ||
string lenguaje = "C++"; | ||
|
||
|
||
int numeroBalas = 25, armorTotal = 78, hpLeft = 62; | ||
const int miConstante = 12; | ||
|
||
|
||
|
||
|
||
int main() | ||
{ | ||
cout << "esto anda de 10" << ", Test si funciona" << endl; | ||
cout << "La vida int es: " << vida << endl; | ||
cout << "El string total de perros es: " << perros << endl; | ||
cout << "el numero float es: " << flotante << endl; | ||
cout << "La letra es: " << letra << endl; | ||
cout << "El booleano es: " << falsito << endl; | ||
cout << "Lo siguiente suma los valores de: numerosBalas, armorTotal y hpLeft \nestadisticas de un juego por ejemplo." << endl; | ||
cout << "La suma de los ints es: " << numeroBalas + armorTotal + hpLeft << endl; | ||
cout << "mi constante es:" << miConstante << endl; | ||
cout << "Hola, mi lenguaje es: " << lenguaje << ", y estoy encantado de ir aprendiendo." << endl; | ||
return 0; | ||
|
||
} | ||
|
||
|
29 changes: 29 additions & 0 deletions
29
Roadmap/00 - SINTAXIS, VARIABLES, TIPOS DE DATOS Y HOLA MUNDO/c/1ceL4nc3.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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// | ||
|
||
} |
18 changes: 18 additions & 0 deletions
18
Roadmap/00 - SINTAXIS, VARIABLES, TIPOS DE DATOS Y HOLA MUNDO/c/d1d4cum.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#include <stdio.h> | ||
|
||
|
||
// https://www.w3schools.com/c/index.php | ||
// Comentario de una sola línea | ||
/* | ||
Comentario | ||
de varias | ||
líneas | ||
*/ | ||
|
||
int age = 28; | ||
const char letter = 'D'; | ||
|
||
int main() { | ||
printf("¡Hola, C!\n"); | ||
return 0; | ||
} |
50 changes: 50 additions & 0 deletions
50
Roadmap/00 - SINTAXIS, VARIABLES, TIPOS DE DATOS Y HOLA MUNDO/java/Ainoaran.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
//Reto #00 SINTAXIS, VARIABLES, TIPOS DE DATOS Y HOLA MUNDO; | ||
|
||
|
||
public class Ainoaran { | ||
|
||
public static void main(String[] args) { | ||
|
||
//URL Sitio oficial JAVA: https://docs.oracle.com/javase/8/docs/api/ | ||
|
||
/*Comentarios: | ||
- Los comentarios de una sola línea se realizan utilizando "//" | ||
- Los comentarios en varias líneas se inicializan con "/*" y se finaliza con '* /' | ||
*/ | ||
|
||
//VARIABLES: | ||
|
||
String variable = "Es una variable"; | ||
final String constante = "Es una constante"; | ||
|
||
//DATOS PRIMITIVOS: | ||
|
||
// Byte: Ocupa 8 bits (1 byte). Valores de -128 a 127 (inclusive). | ||
byte age = 25; | ||
|
||
// Short: Ocupa 16 bits (2 bytes). Valores de -32,768 a 32,767 (inclusive). | ||
short year = 2024; | ||
|
||
// int: Numero entero. Ocupa 32 bits (4 bytes). Valores de -2,147,483,648 a 2,147,483,647 (inclusive). | ||
int population = 8200000 ; | ||
|
||
// long: Número entero largo. Ocupa 64 bits (8 bytes). Valores de -9,223,372,036,854,775,808 a 9,223,372,036,854,775,807 (inclusive). | ||
long distance= 1000000000L; | ||
|
||
// float: Número de punto flotante de precisión simple. Ocupa 32 bits (4 bytes). | ||
float height = 1.75f; | ||
|
||
// double: Número de punto flotante de doble precisión. Ocupa 64 bits (8 bytes). | ||
double decimal = 6371.0; | ||
|
||
// char: Un solo carácter Unicode. Ocupa 16 bits (2 bytes). | ||
char character = 'A'; | ||
|
||
// boolean: Valor booleano, true o false. Ocupa 1 bit. | ||
boolean isAdult = true; | ||
|
||
// Imprime por terminal el texto: "¡Hola, [y el nombre de tu lenguaje]!" | ||
|
||
System.out.println("¡Hola, Java!"); | ||
} | ||
} |
96 changes: 96 additions & 0 deletions
96
Roadmap/00 - SINTAXIS, VARIABLES, TIPOS DE DATOS Y HOLA MUNDO/java/Password1989.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
package org.roadmap.java; | ||
|
||
public class Password1989 { | ||
|
||
public static void main(String[] args) { | ||
/* | ||
* ¿Preparad@ para aprender o repasar el lenguaje de programación que tú quieras? | ||
* - Recuerda que todas las instrucciones de participación están en el | ||
* repositorio de GitHub. | ||
* | ||
* Lo primero... ¿Ya has elegido un lenguaje? | ||
* - No todos son iguales, pero sus fundamentos suelen ser comunes. | ||
* - Este primer reto te servirá para familiarizarte con la forma de participar | ||
* enviando tus propias soluciones. | ||
* | ||
* EJERCICIO: | ||
* - Crea un comentario en el código y coloca la URL del sitio web oficial del | ||
* lenguaje de programación que has seleccionado. | ||
* - Representa las diferentes sintaxis que existen de crear comentarios | ||
* en el lenguaje (en una línea, varias...). | ||
* - Crea una variable (y una constante si el lenguaje lo soporta). | ||
* - Crea variables representando todos los tipos de datos primitivos | ||
* del lenguaje (cadenas de texto, enteros, booleanos...). | ||
* - Imprime por terminal el texto: "¡Hola, [y el nombre de tu lenguaje]!" | ||
* | ||
* ¿Fácil? No te preocupes, recuerda que esta es una ruta de estudio y | ||
* debemos comenzar por el principio. | ||
*/ | ||
|
||
/* URL del sitio web oficial de JAVA: | ||
* https://www.java.com/es/ | ||
*/ | ||
|
||
/* | ||
* Comentario de varias lineas | ||
*/ | ||
|
||
//Comentario de una linea | ||
|
||
/* | ||
* Ejercicio crea una variable: | ||
*/ | ||
String variableJava = "Java"; | ||
|
||
/* | ||
* Ejercicio crea una constante: | ||
*/ | ||
|
||
final String constanteJava = "Java"; | ||
|
||
/* | ||
* Datos primitivos en JAVA: | ||
* El lenguaje Java da de base una serie de tipos de datos primitivos. | ||
* | ||
* byte: Representa un tipo de dato de 8 bits con signo. De tal manera que puede almacenar los valores numéricos de -128 a 127 (ambos inclusive) | ||
* short: Representa un tipo de dato de 16 bits con signo. De esta manera almacena valores numéricos de -32.768 a 32.767. | ||
* int: Es un tipo de dato de 32 bits con signo para almacenar valores numéricos. Cuyo valor mínimo es -231 y el valor máximo 231-1. | ||
* long: Es un tipo de dato de 64 bits con signo que almacena valores numéricos entre -2 elevado 63 a 2 elevado a 63-1 | ||
* float: Es un tipo dato para almacenar números en coma flotante con precisión simple de 32 bits. | ||
* double: Es un tipo de dato para almacenar números en coma flotante con doble precisión de 64 bits. | ||
* char: Es un tipo de datos que representa a un carácter Unicode sencillo de 16 bits. | ||
* boolean: Sirve para definir tipos de datos booleanos. Es decir, aquellos que tienen un valor de true o false. Ocupa 1 bit de información. | ||
* | ||
* Primitivos | ||
* Lista de tipos de datos primitivos en JAVA | ||
* Tipo Tamaño Valor mínimo Valor máximo | ||
* byte 8 bits -128 127 | ||
* short 16 bits -32768 32767 | ||
* int 32 bits -2147483648 2147483647 | ||
* long 64 bits -9223372036854775808 9223372036854775807 | ||
* float 32 bits -3.402823e38 3.402823e38 | ||
* double 64 bits -1.79769313486232e308 1.79769313486232e308 | ||
* char 16 bits u000 ufff | ||
*/ | ||
byte b = -128; | ||
short s = -32768; | ||
int i = -2147483648; | ||
long l = -9223372036854775808l; | ||
float f = -3.402823e38f; | ||
double d = -1.79769313486232e307d; | ||
char c; | ||
boolean bl = true; | ||
|
||
//Facil: System.out.println("¡Hola, " + variableJava + "!"); | ||
System.out.println(String.format("¡Hola, %s!", variableJava)); | ||
|
||
/* | ||
* El título de la Pull Request también debe seguir este formato: "#[número] - [lenguaje_utilizado]". | ||
* En el ejemplo anterior sería "#00 - Python". | ||
* | ||
* En mi caso seria: "#00 - Java" | ||
*/ | ||
|
||
} | ||
|
||
} |
Oops, something went wrong.