Python Programming 1

Course Code: PYP1

Duration: 4 days

 
 

Python Programming 1 Course 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, exception handling, binary and text files, and databases.

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

Course Objectives

This course aims to provide the delegate with the knowledge to be able to produce Python scripts and applications that exploit all core elements of the language including variables, expressions, selection and iteration, functions, objects, collections, strings, modules, pattern matching, exception handling, I/O, and classes.

Who will the Course Benefit?

The Python Programming 1 course course is aimed at those who want to improve their Python programming skills, and for developers/engineers who want to migrate to Python from another language, particularly those with little or no object-oriented knowledge. For those wishing to learn Python and have no previous knowledge of programming, they should look to attend our foundation course Introduction to Programming - Python.

Skills Gained

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
  • Handling exceptions
  • Reading from and writing to files and databases
  • Coding in an OOP manner

Python Programming 1 Training Course

Course Introduction

  • Administration and Course Materials
  • Course Structure and Agenda
  • Delegate and Trainer Introductions

Session 1: GETTING STARTED

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

Session 2: PYTHON SCRIPTS & SYNTAX

  • 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

Session 3: VARIABLES & DATA TYPES

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

Session 4: OPERATORS & EXPRESSIONS

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

Session 5: CONDITIONS & LOOPS

  • Conditional statements (if, elif, else)
  • Nested conditional statements
  • 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

Python Programming 1 Training Course

Session 6: FUNCTIONS

  • Declaration
  • Invocation
  • Default values for parameters
  • Named arguments
  • args and kwargs
  • Returning multiple values
  • None returned
  • Variable scope
  • Masking and shadowing
  • The pass keyword
  • Recursive functions

Session 7: OBJECTS AND CLASSES

  • About objects
  • Attributes and the dot notation
  • The dir function
  • Dunder attributes
  • Mutability
  • The id function
  • Pass by reference
  • Introduction to Classes
  • Class Declaration and Instantiation
  • Data attributes
  • Methods
  • Composition

Session 8: LISTS

  • 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

Session 9: TUPLES

  • 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

Session 10: SETS

  • About Sets
  • Dictionary syntax
  • Creating, adding and removing set elements
  • Iterating over a set
  • Membership Testing
  • Sorting
  • Copying
  • Set methods incl. union, intersection, difference, symmetric_difference etc.

Python Programming 1 Training Course

Session 11: DICTIONARIES

  • 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

Session 12: STRINGS

  • 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

Session 13: MODULES & PACKAGES

  • About modules
  • Inbuilt modules math, random and platform
  • the dir() and help() functions
  • Creating and using modules
  • the __pycache__ and the .pyc files
  • 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

Session 14: PATTERN MATCHING

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

Python Programming 1 Training Course

Session 15: EXCEPTION HANDLING

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

Session 16: FILES & THE FILESYSTEM

  • 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
  • Text encoding schemes, codepoints, codespace
  • ASCII and UNICODE (UTF schemes)
  • UTF-8, binary and hexadecimal representations
  • The ord() and chr() functions
  • Binary files, bytes and bytearray
  • I/O layered abstraction.
  • About the os module
  • os module functions incl. getcwd, listdir, mkdir, chdir, remove, rmdir etc.
  • OSError numbers and the errno module

Session 17: DATABASES

  • The DB-API
  • DP-API implementations
  • Establishing a connection
  • Creating a cursor
  • Executing a query
  • Fetching results
  • Transactions
  • Inserting, updating, and deleting records
Notes:
  • 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.

Examinations

This Python Programming 1 course is an excellent choice for delegates preparing to take the following Python Institute exam:

  • Certified Entry-Level Python Programmer: PCEP

This course together with the Python Programming 2 course is an excellent choice for delegates preparing to take the following Python Institute exam:

  • Certified Associate in Python Programming: PCAP

Attending this course will help the delegate gain many of the skills and product knowledge requirements as outlined in the exam objectives. Studying this course and its associated reference materials can form part of the preparation to achieve certification. Experience, practice, self-study and aptitude are also key requirements for exam success.

Before taking any exam, ensure you have the recommended experience. The Python Institute website lists all exam requirements and these are updated regularly.

Exams are not included as part of the course.

Requirements

Delegates attending this course should have some previous programming experience and be able to define general programming concepts including: compilation, execution, variables, arrays, sequence, selection, iteration, functions, objects, and classes. Moreover delegates should be able to navigate the filesystem (on the command line ideally), edit and save text files and browse the web. This knowledge can be obtained by attendance on the pre-requisite Introduction to Programming - Python course.

Pre-Requisite Courses

Course Reviews

I found that that the course was pitched just at the right level. I was a bit concerned that, having been in software development for some time (although relatively new to Python) that some parts of the course might be of less relevance. Not a bit if it, I have learned stuff in the last 4 days that I would never have picked up from a text book or on-line video. The stuff around Object Oriented programming and how the different data types are used and how you can implement them in Python have been especially useful. I have learned a tremendous amount about python not just about the language itself but, perhaps more importantly, how it could be practically applied in the professional software environment. Stuart was a fantastic presenter and passed over the information in a very informative, understandable, pragmatic way without ever losing your interest. Stuart was always available outside of the course for advice and guidance and was particularly helpful to me when I had queries on certain topics. I would thoroughly recommend this course to anyone interested in taking up python. Even for people who have a solid background in python, I am sure that there will be a lot they will pick up from this course.

Giles - Software Engineer - Government - December 2022


Very interesting and useful. Everything was explained really succinctly and understandably. Lecturer made sure everyone was following along and frequently asked if we had any questions. Genuinely enjoyed it. Exercises were good.

Adam - Apprentice Software Engineer - Government


Absolutely superb from start to finish. I feel as though I'm ready to start writing basic Python apps which I hoped would be possible at the outset. Can't speak highly enough of tutor, Stuart, whose clear, understandable explanation of the more complex aspects was simply outstanding.

Mark - Government


Musie was very articulate knew his subject well, you got the feeling he really cared about you wanting to learn, he kept asking questions to make sure we understand what we are learning, he was passionate about coding and very sincere in his approach, overall a good teacher, only negative I would say is sometimes the explanations were too long but overall top marks.

Shazaul - IT Manager - Real Estate


Kevin was very helpful in answering any questions. He was also considerate of individuals background and previous knowledge and taught at a comfortable pace for everyone.

Apilan - Data Analyst


Kevin was an outstanding instructor. I would certainly recommend the course to anyone as a first step in to python Really appreciate all hard work and patience from Kevin, who showed to be very knowledgeable, yet approachable and understanding. Ready to answer and elaborate on all questions posed. I will be walking away with a solid foundation on python and looking forwards to putting into practice the content of what I learnt.

Augusto - Network Engineer - Communications


Public Scheduled Events

Classroom & Live Virtual Instructor-Led Training

Duration: 4 days

Price: £1,695.00 exc. VAT 


Start Date Options Spaces  
21 Feb 2023
StayAhead Virtual Courses available 
Spaces Book Now 
03 Apr 2023
StayAhead Virtual Courses available 
Spaces Book Now 
09 May 2023
StayAhead Virtual Courses available 
Spaces Book Now 
26 Jun 2023
StayAhead Virtual Courses available 
Spaces Book Now 
08 Aug 2023
StayAhead Virtual Courses available 
Spaces Book Now 
19 Sep 2023
StayAhead Virtual Courses available 
Spaces Book Now 
31 Oct 2023
StayAhead Virtual Courses available 
Spaces Book Now 
12 Dec 2023
StayAhead Virtual Courses available 
Spaces Book Now 


Start Date Options Spaces  
14 Feb 2023
StayAhead Virtual Courses available 
Spaces Book Now  POA
20 Mar 2023
StayAhead Virtual Courses available 
Spaces Book Now  POA
27 Mar 2023
StayAhead Virtual Courses available 
Spaces Book Now  POA
 

Live Virtual Classroom

 
Join live instructor-led classroom training from the comfort of your home or office.
All the convenience and benefits of the classroom experience without the hassle and costs of travel and accommodation.
 
 



Our Customers Include

 
missing image
missing image
missing image
missing image
missing image
missing image
missing image
missing image
missing image
missing image
missing image
missing image
missing image
missing image
missing image
missing image
missing image
missing image
missing image
missing image
missing image
missing image
missing image
missing image
 
 



Our Course Curriculum

 
 
 
+44 (0)20 7600 6116
Enquiries@StayAhead.com
Copyright © 2023 StayAhead Training Ltd
Cookies   /   Privacy Policy