Python Programming 1

4 Day Course
Hands On
Code PYP1

Book Now - 2 Delivery Methods Available:

Classroom Virtual Classroom Private Group - Virtual Self-Paced Online

Overview

Python is an object oriented rapid development language deployed in many scenarios in the modern world.

This Python Programming 1 course is designed to give delegates the knowledge to develop and maintain Python scripts using the current version (V3) of Python.

There are many similarities between Python V2 and Python V3. The skills gained on this course will allow the delegate to develop their own skills further using Python V2 or V3 to support the development and maintenance of scripts.

The Python Programming 1 course comprises sessions dealing with syntax, variables and data types, operators and expressions, conditions and loops, functions, objects, collections, modules and packages, strings, pattern matching, dates, exception handling, files, and databases.

Exercises and examples are used throughout the course to give practical hands-on experience with the techniques covered.

Objectives

The delegate will learn and acquire skills as follows:

  • Writing and testing simple scripts
  • Representing data using built-in and custom data types
  • Building expressions
  • Building conditional and iterative statements
  • Declaring and calling functions
  • Using objects
  • Creating and manipulating collections including lists, tuples, and dictionaries
  • Creating and manipulating strings
  • Creating modules and packages, and using third-party libraries
  • Pattern matching
  • Working with date and time objects
  • Handling exceptions
  • Reading from and writing to files and databases
  • Coding in an OOP manner

Target Audience

The Python Programming 1course is aimed at anyone who wants to learn Python as a first language, and developers/engineers who want to migrate to Python from another language, particularly those with little or no object-oriented knowledge.

Additional Information

  • Course technical content is subject to change without notice.
  • Course content is structured as sessions, this does not strictly map to course timings. Concepts, content and practicals often span sessions.

Training Partners

We work with the following best of breed training partners using our bulk buying power to bring you a wider range of dates, locations and prices.

Modules

Hide all

Getting Started (7 topics)

  • About Python
  • Python versions
  • Python documentation
  • Python runtimes
  • Installing Python
  • The REPL shell
  • Python editors

Python Scripts and Syntax (10 topics)

  • Script naming
  • Comments
  • Docstring
  • Statements
  • The backslash
  • Code blocks
  • Whitespace
  • Console IO (to enable the writing of simple programs)
  • A first Python program
  • Script execution

Variables and Data Types (9 topics)

  • Literals
  • Identifiers
  • Assignment
  • Numbers (bool, int, float, complex)
  • Binary, octal, and hexadecimal numbers
  • Collections (str, list, tuple, set, dict)
  • None
  • Implicit and explicit type conversion (casting)
  • The type function

Python Operators (7 topics)

  • Arithmetic Operators
  • Comparison Operators
  • Assignment Operators
  • Bitwise Operators
  • Logical Operators
  • Membership Operators
  • Identity Operators

Functions (11 topics)

  • Declaration
  • Invocation
  • Default values for parameters
  • Named arguments
  • args and kwargs
  • Returning multiple values
  • Nested functions
  • Functions as data
  • Introduction to lambda expressions
  • Variable scope
  • The pass keyword

Objects (11 topics)

  • About objects
  • Attributes and the dot notation
  • Data attributes
  • Method attributes
  • The dir function
  • Magic methods and operator overloading
  • Mutability
  • Variables: references to objects
  • Variable assignment (again)
  • Pass by reference
  • The id function and identity operator

Lists (10 topics)

  • About lists
  • List syntax including slicing
  • Getting and setting list elements
  • Iterating over a list
  • Checking for the presence of a value
  • The len function
  • List methods incl. append, insert, remove, pop, clear, copy, sort, reverse etc.
  • The del keyword
  • Appending to and combining lists
  • List comprehension

Tuples (7 topics)

  • About tuples
  • Tuple syntax
  • Getting tuple elements including unpacking
  • Iterating over a tuple
  • Checking for the presence of a value
  • The len function
  • Appending to and combining tuples

Dictionaries (9 topics)

  • About dictionaries
  • Dictionary syntax
  • Getting and setting dictionary elements
  • Iterating over a dictionary (keys, values, and items)
  • Checking for the presence of a key
  • The len function
  • Dictionary methods incl. keys, values, items, get, pop, popitem, clear etc.
  • The del keyword
  • Dictionary comprehension

Conditional and Loops (9 topics)

  • Conditional statements (if, elif, else)
  • Short hand if/if else
  • Python's alternative to the ternary operator
  • Iterative statements (while, for, else)
  • The range function
  • Iterating over a list
  • Break
  • Continue
  • Nested conditional/iterative statements

Strings (9 topics)

  • About strings
  • String syntax including slicing
  • Escape characters
  • Triple-quoted strings
  • Concatenation
  • Placeholders
  • The format method
  • Other methods e.g. endswith, find, join, lower, replace, split, startswith, strip, upper etc.
  • A string as a list of bytes

Modules and Packages (18 topics)

  • About modules
  • The module search path
  • Importing modules
  • Namespaces
  • Importing module objects
  • The import wildcard
  • Aliases
  • Importing within a function
  • Executable modules
  • Reloading a module
  • About packages
  • Importing packaged modules
  • Importing packaged module objects
  • Package initialisation
  • Subpackages
  • Referencing objects in sibling packages
  • The Standard Library
  • Installing modules and packages using pip

Pattern Matching (5 topics)

  • About regular expressions
  • Regular expression special characters
  • Raw strings
  • About the re module
  • re module functions incl. match, search, findall, full match, split, sub

Dates (5 topics)

  • About the datetime module
  • datetime object attributes
  • Creating a datetime object
  • Date arithmetic
  • Formatting dates

Exception Handling (6 topics)

  • About exceptions and exception handling
  • Handling exceptions (try, except, else, finally)
  • Exception types
  • The exception object
  • Raising exceptions
  • Custom exception types

Files and The Filesystem (9 topics)

  • The open function
  • Methods for seeking (seekable, seek)
  • Methods for reading from a file (readable, read, readline, readlines)
  • Iterating over a file
  • Methods for writing to a file (writable, write, writelines)
  • Introduction to context managers
  • File parsing for files of type CSV, XML, JSON, YAML
  • About the os module
  • os module functions incl. getcwd, listdir, mkdir, chdir, remove, rmdir etc.

Databases (8 topics)

  • The DB-API
  • DP-API implementations
  • Establishing a connection
  • Creating a cursor
  • Executing a query
  • Fetching results
  • Transactions
  • Inserting, updating, and deleting records

Object Oriented Programming (OOP) (10 topics)

  • About OOP
  • About classes
  • Creating a class with data and method attributes
  • Creating an instance of a class (an object)
  • Getting and setting an object's data attributes (again)
  • Calling an object's methods (again)
  • Controlling the way objects are created
  • Composition and aggregation
  • An introduction to OOP principles
  • The del keyword and garbage collection

Prerequisites

Familiarity with programming concepts is useful, this knowledge can be obtained by attendance on the Introduction to Programming course.

Scheduled Dates

Please select from the dates below to make an enquiry or booking.

Pricing

Different pricing structures are available including special offers. These include early bird, late availability, multi-place, corporate volume and self-funding rates. Please arrange a discussion with a training advisor to discover your most cost effective option.

Code Location Duration Price Jan Feb Mar Apr May Jun
PYP1 4 Days $2,305
18-21

Course PDF

Print

Share this Course

Share

Recommend this Course

Sections