Skip to content

Commit d949369

Browse files
author
Carlos Mercado
committed
Carlos.py
1 parent 5b4d144 commit d949369

File tree

1 file changed

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

1 file changed

+28
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,29 @@
1+
# https://www.python.org/
12

3+
""" Esto es un comentario
4+
de varias líneas,
5+
haciendo uso de las
6+
triples comillas dobles """
7+
8+
''' Esto tambien es un comentario
9+
de varias líneas,
10+
haciendo uso de las
11+
triples comillas simples '''
12+
13+
# Variable
14+
nombre = "Carlos"
15+
16+
# "Constante" en Python siguiendo la convención de nomenclatura
17+
PI = 3.14159
18+
19+
# Tipos de datos primitivos
20+
apellido = "Mercado" # Variable tipo cadena (str)
21+
edad = 36 # Variable tipo entero (int)
22+
posee_vehiculo = False # Variable tipo booleana (bool)
23+
peso = 55.5 # Variable tipo flotante (float)
24+
lista = [1, 2, 3, 4, 5, 6, 7, 8] # Variable tipo lista (list) mutable
25+
tupla = (10, 20, 30, 40, 50) # Variable tipo tupla (tuple) inmutable
26+
datos_de_personas = {"nombre": "Carlos", "apellido": "Mercado", "edad": 36} # Variable tipo diccionario (dict)
27+
conjunto = {8, 3, 5} #Variable tipo conjunto (set)
28+
29+
print ("¡Hola, Python!")

0 commit comments

Comments
 (0)