De vuelta a Curso

Curso Python: comenzando con el lenguaje

0% Completado
0/0 Pasos
  1. Fundamentos de Python

    1. Introducción a Python
    3 Temas
    |
    4 Cuestionarios

  2. Warning: Undefined array key 0 in /home/u175304009/domains/academia.alcance.online/public_html/wp-content/themes/buddyboss-theme/learndash/ld30/learndash-sidebar.php on line 143

    Warning: Trying to access array offset on value of type null in /home/u175304009/domains/academia.alcance.online/public_html/wp-content/themes/buddyboss-theme/learndash/ld30/learndash-sidebar.php on line 143
  3. 2. Fundamentos de Programación
    3 Temas

  4. Warning: Undefined array key 0 in /home/u175304009/domains/academia.alcance.online/public_html/wp-content/themes/buddyboss-theme/learndash/ld30/learndash-sidebar.php on line 143

    Warning: Trying to access array offset on value of type null in /home/u175304009/domains/academia.alcance.online/public_html/wp-content/themes/buddyboss-theme/learndash/ld30/learndash-sidebar.php on line 143
  5. Estructuras Avanzadas
    3. Funciones y Módulos
    3 Temas

  6. Warning: Undefined array key 0 in /home/u175304009/domains/academia.alcance.online/public_html/wp-content/themes/buddyboss-theme/learndash/ld30/learndash-sidebar.php on line 143

    Warning: Trying to access array offset on value of type null in /home/u175304009/domains/academia.alcance.online/public_html/wp-content/themes/buddyboss-theme/learndash/ld30/learndash-sidebar.php on line 143
  7. 4. Estructuras de Datos
    3 Temas

  8. Warning: Undefined array key 0 in /home/u175304009/domains/academia.alcance.online/public_html/wp-content/themes/buddyboss-theme/learndash/ld30/learndash-sidebar.php on line 143

    Warning: Trying to access array offset on value of type null in /home/u175304009/domains/academia.alcance.online/public_html/wp-content/themes/buddyboss-theme/learndash/ld30/learndash-sidebar.php on line 143
  9. Desarrollo de Aplicaciones
    5. Manejo de Archivos
    3 Temas

  10. Warning: Undefined array key 0 in /home/u175304009/domains/academia.alcance.online/public_html/wp-content/themes/buddyboss-theme/learndash/ld30/learndash-sidebar.php on line 143

    Warning: Trying to access array offset on value of type null in /home/u175304009/domains/academia.alcance.online/public_html/wp-content/themes/buddyboss-theme/learndash/ld30/learndash-sidebar.php on line 143
  11. 6. Programación Orientada a Objetos (POO)
    3 Temas

  12. Warning: Undefined array key 0 in /home/u175304009/domains/academia.alcance.online/public_html/wp-content/themes/buddyboss-theme/learndash/ld30/learndash-sidebar.php on line 143

    Warning: Trying to access array offset on value of type null in /home/u175304009/domains/academia.alcance.online/public_html/wp-content/themes/buddyboss-theme/learndash/ld30/learndash-sidebar.php on line 143
  13. 7. Proyecto Final
    3 Temas
Lección 1, Tema 3
En curso

3. Primeros pasos: Escribir y ejecutar tu primer script.

SamirCerrato 6 de abril de 2026
Lección Progreso
0% Completado

Escribir un Script en Python:

  • Un script en Python es un archivo de texto con extensión '.py‘ que contiene código Python.
  • Para crear un script, abre tu editor de texto o entorno de desarrollo, escribe tu código y guárdalo con la extensión '.py' .

Ejecutar un Script en Python:

  • Desde la línea de comandos:
    1. Abre la terminal o el símbolo del sistema.
    2. Navega al directorio donde guardaste tu archivo '.py' .
    3. Ejecuta el script con:
python nombre_del_archivo.py
  • Desde el entorno de desarrollo (IDLE/VS Code):
    1. Simplemente haz clic en “Run” o utiliza el atajo de teclado para ejecutar el script desde el editor.

Ejemplo de Código:

# Script simple que calcula la suma de dos números
numero1 = 5
numero2 = 3
suma = numero1 + numero2
print("La suma es:", suma)

Cuestionarios