Course 589:
Python Programming Essentials

(4 days)

 

Course Description

Python is a powerful, portable, object-oriented, open-source programming language. This course starts by quickly covering the basics: variables, control of flow, functions, modules, packages, and standard libraries. OO programming in Python is covered using a test-first methodology. The course then takes an in-depth look at data structures and exception handling. Coverage includes higher-level Python programming concepts such as iterators, generators, file and database IO, and performance issues. This class is approximately 65% hands-on.

Note: This course uses Python 3.7 and can be taught on Linux and Microsoft Windows.

Learning Objectives

In this course, you will learn how to:

  • Create and execute a Python program on different operating systems
  • Use and manipulate variables
  • Use lists, tuples, and dictionaries
  • Create and use functions
  • Use modules and packages
  • Create exception handling
  • Use classes and be introduced to class creation
  • Increase efficiency using iterators and generators
  • Interact with the Operating System
  • Match text patterns using Regular Expressions
  • Perform unit testing with PyTest
  • Access a database

Who Should Attend

Anyone who wants to learn how to program in Python.

Prerequisites

Prior programming experience is not required for this course.


Course Outline

Quick Start

  • Command Line
  • IDEs
  • A First Program—Twice
  • Basic I/O
  • Getting Help: Debugging

Variable Fundamentals

  • Data Types and Assignment
  • Strings

Program Flow Control

  • Truth in Python
  • Boolean Operators
  • if in All Forms
  • while
  • break and continue

Lists, Tuples, and Dictionaries

  • What Is a List?
  • What Is a Tuple?
  • List Operators and Methods
  • List Comprehensions
  • Tuple Operators
  • for Looping
  • Lists of Lists
  • Understanding and Using Dictionaries

Functions

  • Function Basics
  • Function Attributes
  • Methods of Passing Arguments to Functions
  • Variable Scope
  • Create and Call lambda Functions

Exception Handling

  • What Are Exceptions?
  • Creating Exception Handlers
  • Creating and Raising Exceptions
  • Testing and assert

Modules and Packages

  • Creating and Using Modules
  • Using Packages
  • import

Python Object Fundamentals

  • Classes and Objects
  • Using Objects and Methods
  • Creating Classes
  • Inheritance

File Handling

  • Text File IO
  • Using a with Statement

Iterators and Generators

  • Iterators
  • Comprehensions
  • Generators

Special Topics

  • OS Interface Introduction
  • Command Line with Argparse
  • Regular Expressions and Pattern Matching
  • Creating Subprocesses

Unit Tests (PyUnit)

  • Why and Why Not Unit Tests
  • Patterns for Unit Testing

Database Programming

  • Introduction to Database Programming
  • Executing SQL from Python
  • Processing SELECT Statements
  • Modifying the Database with INPUT and UPDATE Statements

Please Contact Your ROI Representative to Discuss Course Tailoring!