Skip to content

Commit f34d082

Browse files
authored
Merge pull request mouredev#4736 from jafuma0320/main
#00-Python
2 parents 19c811e + d9d3f90 commit f34d082

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
@@ -0,0 +1,28 @@
1+
# EJERCICIO:
2+
3+
# Crea un comentario en el código y coloca la URL del sitio web oficial del lenguaje de programación que has seleccionado.
4+
# Pagina oficial del lenguaje (https://www.python.org/)
5+
6+
# Representa las diferentes sintaxis que existen de crear comentarios en el lenguaje (en una línea, varias...).
7+
# un comentario ( # )
8+
# varios comentarios :
9+
"""""""""""
10+
11+
12+
"""""""""""
13+
14+
# Crea una variable (y una constante si el lenguaje lo soporta).
15+
Estaturas = [1.78, 1.89, 1.52]
16+
17+
# Crea variables representando todos los tipos de datos primitivos del lenguaje (cadenas de texto, enteros, booleanos...).
18+
print(type(10)) # Int
19+
print(type(3.14)) # Float = decimal
20+
print(type(1 + 3j)) # Complex
21+
print(type('Asabeneh')) # String = texto
22+
print(type([1, 2, 3])) # List
23+
print(type({'name':'Asabeneh'})) # Dictionary
24+
print(type({9.8, 3.14, 2.7})) # Set
25+
print(type((9.8, 3.14, 2.7))) # Tuple
26+
27+
# Imprime por terminal el texto: "¡Hola, [y el nombre de tu lenguaje]!"
28+
print ("¡Hola, [PYTHON]!")

0 commit comments

Comments
 (0)