Skip to content

Commit a78c629

Browse files
authored
Merge pull request mouredev#4933 from facundorsabia/mybranch
#00 - Python
2 parents 7a548c7 + 1c09b00 commit a78c629

File tree

1 file changed

+55
-0
lines changed
  • Roadmap/00 - SINTAXIS, VARIABLES, TIPOS DE DATOS Y HOLA MUNDO/python

1 file changed

+55
-0
lines changed
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Ejercicio 00
2+
3+
# https://www.python.org
4+
5+
# Sintaxis para comentarios en Python
6+
7+
# Este es un lenguaje de una linea
8+
9+
'''
10+
Este es
11+
un comentario
12+
multilinea
13+
'''
14+
15+
"""
16+
Y este
17+
también
18+
"""
19+
20+
#Variables
21+
my_variable = "Mi Variable"
22+
my_variable = "Nuevo valor de mi variable"
23+
24+
25+
'''
26+
En Python no existen las constantes, aunque es lo que se pide.
27+
Sin embargo por convención la idea sería utilizar mayúsculas
28+
para que se entienda la intención de que no cambie el valor del dato
29+
'''
30+
31+
MY_CONSTANT = "Mi Constante"
32+
33+
#Datos primitivos, en Python existen 4
34+
35+
#Numeros Enteros
36+
my_int = 1
37+
38+
#Números decimales
39+
my_float = 1.5
40+
41+
#Boolean
42+
my_bool = True
43+
my_bool = False
44+
45+
#Cadena de texto
46+
my_string = "Mi cadena de texto"
47+
48+
#Imprime por terminal el texto: "¡Hola, [y el nombre de tu lenguaje]!"
49+
50+
print("¡Hola, Python!")
51+
52+
print(type(my_int))
53+
print(type(my_float))
54+
print(type(my_bool))
55+
print(type(my_string))

0 commit comments

Comments
 (0)