Duration

3 Days

Audience:

Employees of federal, state and local governments; and businesses working with the government.

Course Description

In this course, you will learn about and explore the Python language at an intermediate level. You will learn to write Python programs dealing with sequences and mappings, program flow control, system calls and file manipulation.

What You’ll Learn

  • Create working Python scripts following best practices
  • Use Python data types appropriately
  • Read and write files with both text and binary data
  • Get familiar with the standard library and its work-saving modules
  • Use statements and control structures
  • Create professional Python applications to an basic level
  • Learn to work with functions such as modules and classes
  • Know when to use collections such as lists, dictionaries, and sets
  • Learn to work with complex types and operators
  • Work with advanced classes
  • Use the Python database API
  • Explore best practices for Python programming

Who Needs to Attend

Although this is an introductory-level Python programming class, you should already have a working, user-level knowledge of UNIX/Linux, Mac, or Windows. While not required, basic skills with at least one other programming language will be helpful. We will collaborate with you to design the best solution to ensure your needs are met, whether we customize the material, or devise a different educational path to help your team best prepare for this training.

Prerequisites

A working, user-level knowledge of UNIX/Linux, Mac, or Windows. While not required, basic skills with at least one other programming language will be helpful. We will collaborate with you to design the best solution to ensure your needs are met, whether we customize the material, or devise a different educational path to help your team best prepare for this training.

Course Outline

1. Python Overview and History

  • Why Python?
  • How to run Python applications
  • Python configuration details

2. Language Basics

  • Program structure
  • Strings
    • Basic operations
    • Slices
    • Formatting
  • Numbers
    • Types
    • Basic arithmetic operations
    • Formatting
    • Conversions

3. Complex Types and Operators

  • Tuples
  • Lists
    • Tuple and list manipulation
    • Basic operations
  • Dictionary
  • Files
    • Opening
    • Reading
    • Writing

4. Statements and Control Structures

  • Assignment
  • Expressions
    • if statements
    • while loops
    • for loops

5. Functions

  • Function basics
  • Scope rules
  • Arguments
  • Functions as arguments

6. Modules

  • Module basics
  • Namespaces
  • Importing and reloading modules

7. Classes

  • What is a class?
  • What is an object?
  • Class basics
  • Writing methods

8. Advanced Classes

  • Inheritance
  • Operator overloading

Labs

This course is about 50% hands-on lab and 50% lecture, with extensive programming exercises designed to reinforce core Python programming skills, concepts and best practices learned in the lessons. Students will write numerous Python scripts to reinforce the major concepts covered in this course. The courses will increase in complexity as more sophisticated techniques are introduced. At the end of each lesson, students will be tested witha set of review questions to ensure that he/she fully grasps the topic. Our courses include ample materials and labs to ensure all students are either appropriately challenged, or assisted, at all times-no matter their skill level.