Skip to content

Commit 2fdbd88

Browse files
authored
Merge pull request mouredev#7585 from Tecno85/ivan
#00 - Python
2 parents aba5f94 + 3da0031 commit 2fdbd88

File tree

1 file changed

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

1 file changed

+49
-0
lines changed
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# https://python.org
2+
3+
# Comentario en una línea
4+
5+
"""
6+
Comentario en
7+
varias líneas
8+
"""
9+
10+
'''
11+
Otro comentario
12+
en varias líneas
13+
'''
14+
15+
name = "Ivan Dario Madrid Daza"
16+
name = "Ismael Madrid Gamez"
17+
18+
# Python no tiene constantes
19+
20+
MY_CONSTANT = "Mi constante"
21+
22+
"""Las constante en Python, se colocan en mayusculas, este es un método por
23+
convención, de la misma manera es posible cambiarle el valor. A la final
24+
realmente no hay constantes en Python."""
25+
26+
# DATOS PRIMITIVOS
27+
28+
my_int = 15
29+
# Esta es un dato primitivo entero
30+
31+
my_float = 1.64
32+
# Este es un dato primitivo flotante o float
33+
34+
my_bool = True
35+
# Este es un dato primitivo boleano
36+
37+
my_str = "Aprendiendo Python"
38+
my_other_string = 'Aprendiendo Python'
39+
# Este es un dato primitivo string o cadena de texto
40+
41+
# Imprimir mensaje por consola
42+
lenguaje = "Python"
43+
print(f"\n¡Hola, el lenguaje que estoy aprendiendo es: {lenguaje}\n")
44+
45+
# Obtener tipo de dato
46+
print(my_int)
47+
print(my_float)
48+
print(my_bool)
49+
print(my_str)

0 commit comments

Comments
 (0)