Course 589:
Python Programming Essentials
(2 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, exceptions, packages, and standard libraries. This class is approximately 65% hands-on.
Learning objectives
In this course, you will learn how to:
- Use Python interactively
- Create and execute a Python program
- Create and manipulate variables and track their scope
- Use objects from built-in types
- Create and access collections: lists, tuples, and dictionaries
- Employ Python flow control statements for conditional and repeated execution
- Define and call functions
- Access additional modules and packages
- Track objects within a namespace
- Define exceptions and deploy an exception handler
- Define object oriented design and programming
- Define classes for custom type creation
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
Module 1: Quick Start
- Command Line
- IDEs
- A First Program—Twice
- Basic I/O
- Getting Help: Debugging
Module 2: Variable Fundamentals
- Data Types and Assignment
- Strings
- Integers and Floating Point Objects
- Boolean Type
- Shared References
Module 3: Program Flow Control
- Boolean Operators
- if Conditional testing
- Iterating using while
- Short circuit loops: break and continue
Module 4: Lists, Tuples, and Dictionaries
- Sequential Types and Indexing
- Lists and Tuples
- List Operators and Methods
- for Looping
- List Comprehensions
- Tuple Operators
- Collections of Collections
- Dictionaries and Methods
Module 5: Functions
- Function Basics
- Function Attributes
- Methods of Passing Arguments to Functions
- Variable Scope
- Create and Call lambda Functions
Module 6: Exception Handling
- What Are Exceptions?
- Creating Exception Handlers
- Creating and Raising Exceptions
- Testing and assert
Module 7: Modules and Packages
- Creating and Using Modules
- Using Packages
- Accessing Python Standard Library
- import
Module 8: Python Object Fundamentals
- Classes and Objects
- Using Objects and Methods
- Creating Classes
- Inheritance
Module 9: File Handling
- Opening and Closing Files
- Text File IO
- Invoking the Context Manager by the with Statement