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
37 changed files
with
5,716 additions
and
1,247 deletions.
There are no files selected for viewing
35 changes: 35 additions & 0 deletions
35
Roadmap/00 - SINTAXIS, VARIABLES, TIPOS DE DATOS Y HOLA MUNDO/java/clespinosa2024.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,35 @@ | ||
/* | ||
* Este es un comentario multilínea | ||
* https://www.java.com | ||
*/ | ||
package vaariables; | ||
|
||
/** | ||
* | ||
* @author Claudia | ||
*/ | ||
public class Variables { | ||
|
||
public static void main(String[] args) { | ||
|
||
String mensaje = "Hola Java"; | ||
|
||
// variable de tipo int inicializada | ||
int edad = 32; | ||
//variable de tipo char inicializada | ||
char sexo = 'F'; | ||
/* variable tipo float mediante un casteo. | ||
Representa mi estatura en metros | ||
*/ | ||
float estatura = 1.50f; | ||
|
||
|
||
//constante de tipo double | ||
double pi = 3.141592265358979323846; | ||
|
||
//variable de tipo boleana que representa mi estado civil | ||
boolean single = true; | ||
System.out.println(mensaje); | ||
|
||
} | ||
} |
53 changes: 53 additions & 0 deletions
53
Roadmap/00 - SINTAXIS, VARIABLES, TIPOS DE DATOS Y HOLA MUNDO/python/Howlett9999.py
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,53 @@ | ||
#https://www.python.org/ | ||
|
||
#Esto es un comentario de una sola línea | ||
|
||
""" | ||
Esto es un comentario | ||
de varias líneas | ||
""" | ||
#Python no tiene un delimitador especifico para comentarios en multiples lineas, | ||
#por lo que se usan comillas triples, que funcionan como cadenas de texto no asignadas a una variable | ||
''' | ||
Esto tambien es un | ||
comentario de | ||
varias lineas | ||
''' | ||
|
||
nueva_variable = "nueva variable" | ||
variable1 = 10 | ||
precio_con_impuesto = 19.90 | ||
|
||
CONSTANTE1 = "Constante 1" #por convencion porque python no tiene constantes | ||
MI_CONSTANTE_1= "100" | ||
PI = 3.1416 | ||
|
||
#Tipos de datos numéricos | ||
dato_int = 10 | ||
dato_float = 3.1416 | ||
dato_complex = 2 + 3j | ||
#Tipos de datos booleanos | ||
dato_bool = True | ||
dato_bool = False | ||
#Tipos de datos secuenciales | ||
dato_str = "nueva cadena de texto" #cadenas de caracteres | ||
otro_dato_str = 'segunda cadena de texto' | ||
dato_list = [1,2,3,"cuatro"] #lista, colección ordenada y mutable de elementos | ||
dato_tuple = (1,2,3,"cuatro") #coleccion ordenada e inmutable de elementos | ||
dato_range = range(0,10) #secuencias de numeros enteros, comunmente usadas en bucles | ||
#Tipos de datos conjuntos | ||
dato_set = {1,2,3,4} #conjuntos, colección desordenadande elementos unicos | ||
dato_frozenset = frozenset([1,2,3,4]) #conjuntos inmutables | ||
#Tipos de dato de mapeo | ||
dato_dict = {"clave": "valor", "edad": 25} #diccionarios, una colección desordenada de pares clave-valor | ||
#Tipos de dato binario | ||
dato_bytes = b"hola" #secuencia inmutable de enteros en el rango de 0 a 255 | ||
dato_bytearray = bytearray(b"hola") #secuencia mutable de enteros en el rango de 0 a 255 | ||
dato_memoryview = memoryview(b"hola") #un objeto que puede acceder a los datos subyacentes de un objeto binario sin copiarlo | ||
|
||
#Tipo Especial | ||
dato_NoneType = None #representa el valor none, es decir, la ausencia de valor | ||
|
||
print("¡Hola, Python!") | ||
|
||
|
21 changes: 21 additions & 0 deletions
21
Roadmap/00 - SINTAXIS, VARIABLES, TIPOS DE DATOS Y HOLA MUNDO/python/ggtorca.py
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,21 @@ | ||
# Esto es un comentario. Sitio web oficial de python: https://www.python.org/ | ||
|
||
""""" | ||
Esto | ||
Tambien | ||
¡Es un comentario! | ||
""" | ||
mi_variable = "esto es mi variable" | ||
|
||
MI_CONSTANTE = "Esto es mi constante" | ||
|
||
# Datos primitivos en python | ||
un_int = 10 | ||
un_float= 3.14 | ||
un_string ="Esta es mi string" | ||
un_booleano_cierto = True | ||
un_booleano_false = False | ||
un_nulo = None | ||
|
||
# Imprimir por pantalla | ||
print("¡Hola, Python!") |
Oops, something went wrong.