Introduction to Python 3.x (CP-IN)

This course is aimed at teaching developers how to use Python for application development, system administration, or automate tasks in a simple, yet powerful way.

Type

Certified Training Course

Level

Beginner

Cost

R 9 900 p.p. (Excl VAT)

SATV Redeemable 

N/A

Delivery Method

Classroom-based, Instructor-led with emphasis on hands-on exercises.

Duration

5 days

Start time: 09:00 (Registration will commence at 08:30 on the first day)

Prerequisites

The knowledge and skills that a learner must have before attending this course is as follows:

  • Working or user-level knowledge of an operating system such as Linux, Windows, or MacOS.
  • Basic skill with at least one other programming language. 

Course Objectives

At the end of this course, you should be able to do the following:

  • Understand what Python programming is
  • Navigate the Python programming environment 
  • Use variable, string, operators and command line parameters 
  • Understand the Python flow control 
  • Work with file using Python 
  • Understand Python Sequences and Sequence types 
  • Create and work with dictionaries and sets 
  • Use Python functions 
  • Sort data using Python 
  • Use Modules
  • Use the Standard Library

Exam & Certifications

None.

Course Topics

1. About this course

  • Welcome
  • Classroom etiquette
  • Course outline
  • Student files
  • Extracting the student files
  • Examples
  • Lab exercises
  • Appendices

2. An Overview of Python

  • What is Python?
  • The Birth of Python
  • Python Timeline
  • About Interpreted Languages
  • Advantages of Python
  • Disadvantages of Python
  • How to get Python
  • The end of 2.x
  • Getting Help
  • Pydoc
  • Using Pydoc

3. The Python Environment

  • Starting Python
  • If the interpreter is not in your PATHs
  • Using the interpreter
  • Trying out a few commands
  • The help() Command
  • Python scripts on UNIX
  • Python scripts on Windows
  • Python editors and IDEs

4. Getting Started

  • Using Variables
  • Keywords
  • Built-in Functions
  • Variable Typing
  • Strings
  • Single-delimited String Literals
  • Tripe-delimited String Literals
  • Raw String Literals
  • Unicode Characters
  • String Operators and Methods
  • Numeric literals
  • Math Operators and Expressions
  • Converting among types
  • Writing to the screen
  • String Formatting
  • Command Line Parameters
  • Reading from the Keyboard    

5. Flow Control

  • About flow control
  • What’s with the white space?
  • If and Elif
  • Conditional expressions
  • Relational operators
  • Boolean operators
  • While loops
  • Alternate ways to Exit a loop

6. Sequences

  • About sequences
  • Lists
  • Tuples
  • Indexing and Slicing
  • Iterating Through a Sequence
  • Using Enumerate()
  • Functions for All Sequences
  • Keywords and Operators for All Sequences
  • The Range() Function
  • Nested Sequences
  • List Comprehensions
  • Generator Expressions

7. Working with files

  • Text file I/O
  • Opening a Text File
  • The With Block
  • Reading a Text File
  • Writing to a Text File
  • Non-Delimited (Raw) Data

8. Dictionaries and Sets

  • About dictionaries
  • When to use dictionaries
  • Creating dictionaries
  • Getting dictionary values
  • Iterating through a dictionary
  • Reading file data into a dictionary
  • Counting with dictionaries
  • About Sets
  • Creating Sets
  • Working with Sets

9. Functions

  • Defining a function
  • Function parameters
  • Returning values
  • Variable scope

10. Sorting

  • Sorting
  • The Sorted() Function
  • Alternate Keys
  • Lambda Functions
  •  Sorting Nested Data
  • Sorting Dictionaries
  • Sorting in Reverse
  • Sorting Lists in Place

11. Using Modules

  • Regular Expressions
  • RE Syntax Overview
  • RE Objects
  • Searching for Patterns
  • Matching Without Re Objects
  • Compilation Fags
  • Grouping
  • Special Groups
  • Replacing Text
  • Splitting a String

12. Using the Standard Library

  • The Sys Module
  • Interpreter Information
  • STDIO
  • Launching External Programs
  • Paths, Directories, and Filenames
  • Walking Directory Trees
  • Grabbing Web Pages
  • Sending E-mail
  • Math Functions
  • Random Values
  • Dates and Times
  • Zipped Archives

13. An Introduction to Python Classes

  • About O-O Programming
  • Defining Classes
  • Initialisers
  • Instance Methods
  • Properties
  • Class Methods and Data
  • Static Methods
  • Private Methods
  • Inheritance
  • Untangling the Nomenclature