Introduction to Python 3 Training (PYT138)
Learn Python 3 fundamentals, including functions, data structures, control flow, exceptions, files, packages, virtual environments, and clean coding.
Register or Request Training
- Private class for your team
- Live expert instructor
- Online or on‑location
- Customizable agenda
- Proposal responses same day as request
- On-Demand 24/7
- Readings, Video Presentations, Exercises
- Quizzes to knowledge check
- Life-Time Access
Course Overview
Introduction to Python 3 Training provides a practical foundation in Python programming for learners who are new to the language or want to strengthen their core skills. Through explanations and hands-on exercises, you will learn how to run Python programs, work with variables and data types, create functions and modules, perform calculations, manipulate strings, and use essential Python collections such as lists, tuples, dictionaries, and sets. You will also practice collecting user input, reading and writing files, and building small programs that reinforce key programming concepts.
As the course progresses, you will work with virtual environments and packages, conditional logic and loops, exception handling, dates and times, generators, list comprehensions, and more advanced file-processing techniques using pathlib and os. Practical exercises—including games, file-processing tasks, and data-handling challenges—help you apply what you learn. By the end of the course, you will be able to write, organize, test, and troubleshoot Python scripts while following established coding practices with PEP 8 and Pylint.
Course Benefits
- Set up and run Python programs from the terminal and from Python files.
- Create scripts using variables, data types, functions, modules, user input, and formatted output.
- Use arithmetic operations, built-in math functions, and the math and random modules to solve programming problems.
- Work effectively with strings, lists, tuples, ranges, dictionaries, sets, and other iterable objects.
- Build program logic with conditional statements, loops, generators, list comprehensions, and flow-control techniques.
- Configure virtual environments and use pip to manage Python packages.
- Handle runtime problems with exceptions, including raising and managing custom exceptions.
- Use the time and datetime modules to work with dates, times, durations, and formatted time values.
- Read, write, organize, rename, and process files and directories using pathlib, os, and Python file-handling techniques.
- Apply PEP 8 conventions and use Pylint to improve the consistency and quality of Python code.
Delivery Methods
Delivered for your team at your site or online.
Learn at your own pace with 24/7 access.
Course Outline
- Python Basics
- Getting Familiar with the Terminal
- Running Python
- Running a Python File
- Exercise: Hello, world!
- Literals
- Exercise: Exploring Types
- Variables
- Exercise: A Simple Python Script
- Constants and Deleting Variables
- Writing a Python Module
- print() Function
- Collecting User Input
- Exercise: Hello, You!
- Reading from and Writing to Files
- Exercise: Working with Files
- Functions and Modules
- Defining Functions
- Variable Scope
- Global Variables
- Function Parameters
- Exercise: A Function with Parameters
- Returning Values
- Exercise: Parameters with Default Values
- Importing Modules
- Methods vs. Functions
- Math
- Arithmetic Operators
- Exercise: Floor and Modulus
- Assignment Operators
- Precedence of Operations
- Built-in Math Functions
- The math Module
- The random Module
- Exercise: How Many Pizzas Do We Need?
- Exercise: Dice Rolling
- Python Strings
- Quotation Marks and Special Characters
- String Indexing
- Exercise: Indexing Strings
- Slicing Strings
- Exercise: Slicing Strings
- Concatenation and Repetition
- Exercise: Repetition
- Combining Concatenation and Repetition
- Python Strings are Immutable
- Common String Methods
- String Formatting
- Exercise: Playing with Formatting
- Formatted String Literals (f-strings) (introduced in Python 3.6)
- Built-in String Functions
- Exercise: Outputting Tab-delimited Text
- Iterables: Sequences, Dictionaries, and Sets
- Definitions
- Sequences
- Lists
- Sequences and Random
- Exercise: Remove and Return Random Element
- Tuples
- Ranges
- Converting Sequences to Lists
- Indexing
- Exercise: Simple Rock, Paper, Scissors Game
- Slicing
- Exercise: Slicing Sequences
- min(), max(), and sum()
- Converting between Sequences and Strings
- Unpacking Sequences
- Dictionaries
- The len() Function
- Exercise: Creating a Dictionary from User Input
- Sets
- *args and **kwargs
- Virtual Environments, Packages, and pip
- Exercise: Creating, Activating, Deactivating, and Deleting a Virtual Environment
- Packages with pip
- Exercise: Working with a Virtual Environment
- Flow Control
- Conditional Statements
- Compound Conditions
- The is and is not Operators
- all() and any() and the Ternary Operator
- In Between
- Loops in Python
- Exercise: All True and Any True
- break and continue
- Looping through Lines in a File
- Exercise: Word Guessing Game
- The else Clause in Loops
- Exercise: for...else
- The enumerate() Function
- Generators
- List Comprehensions
- Exception Handling
- Exception Basics
- Generic Exceptions
- Exercise: Raising Exceptions
- The else and finally Clauses
- Using Exceptions for Flow Control
- Exercise: Running Sum
- Raising Your Own Exceptions
- Python Dates and Times
- Understanding Time
- The time Module
- Time Structures
- Times as Strings
- Time and Formatted Strings
- Pausing Execution with time.sleep()
- The datetime Module
- datetime.datetime Objects
- Exercise: What Color Pants Should I Wear?
- datetime.timedelta Objects
- Exercise: Report on Departure Times
- File Processing
- Opening Files
- Exercise: Finding Text in a File
- Writing to Files
- Exercise: Writing to Files
- Exercise: List Creator
- The os Module
- os.walk()
- The os.path Module
- A Better Way to Open Files
- Exercise: Comparing Lists
- PEP8 and Pylint
- PEP8
- Pylint
Class Materials
Each student receives a comprehensive set of materials, including course notes and all class examples.
Class Prerequisites
Experience in the following would be useful for this Python class:
- Some prior programming experience is helpful but not required.
Have questions about this course?
We can help with curriculum details, delivery options, pricing, or anything else. Reach out and we’ll point you in the right direction.
