-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path01_variables.py
More file actions
38 lines (26 loc) · 908 Bytes
/
Copy path01_variables.py
File metadata and controls
38 lines (26 loc) · 908 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#variables
variable = "Mi String Variable"
# print(variable)
miNumero = 5
# print(miNumero)
miBoolean = False
#str, int, bool funciona como Parse
#concatenecíon de varibles string
print(variable, ",", str(miNumero), "," , miBoolean)
#funciones del sistema.
# len() =largo de caracteres
print(len("hola mundo"))
#variables en una sola linea
#se pueden mezclar varios tipos en una sola linea
nombre, apellido, alias, edad = "victor", "khan", "bomba", 30
print("mi nombre es:", nombre, apellido,"y mi alias es:", alias,"y edad es:", edad)
#las variables pueden sobreescribirse y cambiar el tipo de variable
#input = caja para almacenar variables
nombre = input("cual es tu nombre?")
edad = input("cual es tu edad?")
"""
IMPORTANTE /// CUIDADO: EJECUTAR LINEA POR LINEA PARA QUE PYTHON PUEDA RECONOCER LOS PARAMETROS, OJO /// CUIDADO
"""
direccion: str = "chile"
direccion: int = 3
print(direccion)