Introducción a Python (MOC 55284)

Duración: 28 horas.
¡Quiero saber más sobre el curso de Introducción a Python (MOC 55284)!

A quien va dirigido

Este curso está dirigido a estudiantes que desean aprender Python. Alguna experiencia en programación es útil pero no requerida.

Descripción

En este curso de formación de Python de 4 días, los estudiantes aprenden a programar en Python. El curso está dirigido a estudiantes nuevos en el idioma que pueden o no tener experiencia con otros lenguajes de programación. Este curso de Python se enseña usando Python 3; sin embargo, se observan diferencias entre Python 2 y Python 3. Para las clases privadas de Python, nuestro instructo…

A quien va dirigido

Este curso está dirigido a estudiantes que desean aprender Python. Alguna experiencia en programación es útil pero no requerida.

Descripción

En este curso de formación de Python de 4 días, los estudiantes aprenden a programar en Python. El curso está dirigido a estudiantes nuevos en el idioma que pueden o no tener experiencia con otros lenguajes de programación. Este curso de Python se enseña usando Python 3; sin embargo, se observan diferencias entre Python 2 y Python 3. Para las clases privadas de Python, nuestro instructor puede enfocarse específicamente en Python 2 si lo desea.

  • Comprenda cómo funciona Python y para qué sirve.
  • Comprender el lugar de Python en el mundo de los lenguajes de programación.
  • Trabaja y manipula cadenas en Python.
  • Realice operaciones matemáticas con Python.
  • Trabaja con secuencias de Python: listas, matrices, diccionarios y conjuntos.
  • Recopile los resultados de entrada y salida del usuario.
  • Realice el procesamiento de control de flujo en Python.
  • Escriba y lea archivos con Python.
  • Escribe funciones en Python.
  • Manejar excepciones en Python.
  • Trabaja con fechas y horas en Python.

Algo de experiencia en programación es útil, pero no es obligatorio.

Python, which first appeared in 1991, is one of the most popular programming languages in use. Python is a high-level programming language, meaning that it uses a syntax that is relatively human readable, which gets translated by a Python Interpreter into a language your computer can understand. Examples of other popular high-level programming languages are C#, Objective-C, Java, PHP, and JavaScript. Interestingly, all of these other languages, unlike Python, share a C-like syntax. If you use one or more of those languages, you may find Python's syntax a little strange. But give it a little time. You'll find it's quite programmer friendly.

  • Running Python
  • Hello, World!
  • Literals
  • Python Comments
  • Variables
  • WRiting a Python Module
  • print() Function
  • Collecting User Input
  • Getting Help


  • Hello, World
  • Exploring Types
  • A Simple Python Script
  • Understand how Python works.
  • Understand Python's place in the world of programming languages.
  • Understand the difference between Python 3.x and Python 2.x.
  • Understand variables and Python's data types.
  • Create simple modules.
  • Get help on Python

This module explains how to work with functions and modules.

  • Defining Functions
  • Variable Scope
  • Global Variables
  • Function Parameters
  • Returning Values
  • Importing Modules
  • A Function with Parameters
  • Parameters with Default Values


  • Define and call functions.
  • Define parameters in the pass arguments to functions.
  • Set default values for parameters.
  • Understand variable scope.
  • Return values from functions.
  • Create and import modules.

Python includes some built-in math functions and some additional built-in libraries that provide extended math (and related) functionality. In this lesson, we'll cover the built-in functions and the math and random libraries.

  • Arithmetic Operators
  • Assignment Operators
  • Built-in Math Functions
  • The math Module
  • The randon Module


  • Floor and Modulus
  • How Many Pizzas Do We Need


  • Do basic math in Python.
  • Use the math module for additional math operations.
  • Use the random module to generate random numbers.

Python includes some built-in math functions and some additional built-in libraries that provide extended math (and related) functionality. In this lesson, we'll cover the built-in functions and the math and random libraries.

  • Quotation Marks and Special Characters
  • String Indexing
  • Slicing Strings
  • Concatentaion and Repetition
  • Common String Methods
  • String Formatting
  • Formatted String Literals (f-strings)
  • Built-in String Functions


  • Indexing Strings
  • Slicing Strings
  • Repetition
  • Playing with Formatting
  • Getting Acquainted with f-strings
  • Outputting Tab-delimited Text


  • Work with strings.
  • Escape special characters
  • Work with multi-line strings.
  • Index and slice strings.
  • Use common string operators and methods.
  • Format strings.
  • Use built-in string functions

Iterables are objects that can return their members one at a time. The iterables we will cover in this lesson are lists, tuples, ranges, dictionaries, and sets.

  • Definitions
  • Sequences
  • Unpacking Sequences
  • Dictionaries
  • The len() Function
  • Sets
  • *args and **kwargs


  • Remove and Return Random Element
  • Simple Rock, Paper, Scissors Game
  • Slicing Sequences
  • Creating a Dictionary from User Input


  • Understand the different types of iterables available in Python
  • Create, modify, and work with lists.
  • Create and work with typles.
  • Create ranges.
  • Create, modify, and work with dictionaries
  • Create sets and to use sets to remove duplicates in lists
  • Understand the *args and **kwargs parameters.

Generally, a program flows line by line in sequential order. We have seen already that we can change this flow by calling functions. The flow can also be changed using conditional statements and loops.

  • Conditional Statements
  • Loops in Python
  • break and continue
  • The enumerate() Function
  • Generators
  • List Comprehensions


  • All True and Any True
  • Word Guessing Game
  • Find the Needle
  • Rolling Dice


  • Work with if conditions in Python.
  • Work with loops in Python.
  • Create generator functions
  • Work with list comprehensions

A virtual environment is a container for a Python development platform on your computer. Packages can be installed in the virtual environment that are separate from your standard, or non-virtual environment.

  • Virtual Environment


  • Working with a Virtual Environment


  • Understand what a virtual environment is.
  • Create a virtual environment.
  • Activate and deactivate a virtual environment.
  • Delete a virtual environment.

Regular expressions are used to do pattern matching in many programming languages, including, Java, PHP, JavaScript, C, C++, and Perl. We will provide a brief introduction to regular expressions and then we'll show you how to work with them in Python.

  • Regular Expression Syntax
  • Python's Handling of Regular Expressions


  • Create regular expressions for pattern matching.
  • Use regular expressions within Python.

This module explains how to work with Unicode and encoding.

  • Bits and Bytes
  • Hexadecimal Numbers
  • Encoding


  • Converting Numbers between Number Systems
  • Finding Confusables


  • Understand binary and hexadecimal numbers.
  • Convert numbers between number systems.

Python allows you to access and modify files and directories on the operating system.

Among other things, you can:

  1. Open new or existing files and store them in file object variables.
  2. Read file contents, all at once or line by line.
  3. Append to file contents.
  4. Overwrite file contents.
  5. List directory contents.
  6. Rename files and directories.
  • Opening Files
  • The os and os.path Modules


  • Finding Text in a File
  • Writing to Files
  • List Creator


  • Read files on the operating system.
  • Create and write to files on the operating system.
  • Access and work with directories on the operating system.
  • Work with the os and os.path modules.

This module explains how to handle exceptions in Python.

  • Wildcard except Clauses
  • Getting Information on Exceptions
  • The else Clause
  • The finally Clause
  • Using Exceptions for Flow Control
  • Raising your Own Exceptions
  • Exception Hierarchy


  • Raising Exceptions
  • Running Sum
  • Handle exceptions in Python.

This module explains how to work with Python dates and times.

  • Understanding Time
  • The time Module
  • The datetime Module


  • Report on Amtrack Departure Times
  • Work with the time module.
  • Work with the datetime module.

This module explains how to run Python scripts form the command line.

  • sys.arg
  • sys.path


  • Migrating Settings by using Windows Easy Transfer
  • Configuring a Reference Image of Windows 7
  • Configuring a Reference Image


  • Run Python scripts from the command line.