File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed
Roadmap/00 - SINTAXIS, VARIABLES, TIPOS DE DATOS Y HOLA MUNDO/python Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change
1
+ #Variables y tipos de datos
2
+
3
+ #Web oficial Python: https://www.python.org/
4
+
5
+ #Comentario de una línea
6
+
7
+ '''
8
+ Comentario de varias líneas
9
+ Normalmente se usa para describir las funciones
10
+ indicando el/los parametro/s de entrada y/o salida
11
+ '''
12
+
13
+ text = "variable"
14
+
15
+ CONSTANT = "constante"
16
+ #En python no existe este tipo de dato,
17
+ #pero se representa con la variable en mayusculas
18
+
19
+ num_int = 23 #integer (int)
20
+ print (num_int , type (num_int ))
21
+ num_float = 23.33 #float
22
+ print (num_float , type (num_float ))
23
+ var1_bool = True
24
+ print (var1_bool , type (var1_bool ))
25
+ var2_bool = False
26
+ print (var2_bool , type (var2_bool ))
27
+ text2 = "Esto es una cadena de texto"
28
+ print (text2 , type (text2 ))
29
+ text3 = 'Puede usarse con comillas simples tambien'
30
+ print (text3 , type (text3 ))
31
+
32
+ print ("¡Hola, python!" )
You can’t perform that action at this time.
0 commit comments