Introduction to Python 3 Training (PYT138)
This Python training course offers a comprehensive introduction to Python, a versatile programming language widely used in web development, data analysis, artificial intelligence, and more. Designed for beginners and those looking to deepen their understanding, this course covers everything from basic syntax to advanced topics like object-oriented programming, file handling, and working with data.
The course begins with Python Basics, where you will get familiar with the terminal, run Python scripts, and create simple programs. You'll learn about literals, variables, constants, and writing Python modules, along with practical exercises to get you starting writing Python code yourself.
Next, you'll explore Functions and Modules, learning how to define functions, manage variable scope, and use parameters. You'll also delve into module importing and the differences between methods and functions through hands-on exercises.
The Math module introduces arithmetic operators, assignment operators, and Python's built-in math functions. You'll also explore the math
and random
modules and solve practical exercises such as calculating the number of pizzas needed or creating a dice-rolling simulator.
In the Python Strings module, you'll learn string manipulation techniques, including indexing, slicing, concatenation, and formatting. You'll also understand the immutability of Python strings, explore common string methods, and use formatted string literals (f-strings) for dynamic text.
The module on Iterables: Sequences, Dictionaries, and Sets covers working with lists, tuples, ranges, dictionaries, and sets. You'll practice using Python’s built-in functions and learn to manipulate and transform various data collections.
The Virtual Environments, Packages, and pip module will guide you through creating and managing isolated development environments, installing packages, and working with virtual environments in Python, ensuring efficient dependency management.
Flow Control introduces you to conditional statements, loops, and control flow mechanisms like if
, else
, for
, and while
loops. You'll learn to use advanced constructs like break
, continue
, and the enumerate()
function, mastering control over your program's flow.
Exception Handling covers error management in Python. You'll learn about exception basics, handling multiple exceptions, and using try
, except
, else
, and finally
clauses. Exercises will help you understand raising and managing exceptions effectively.
The Python Dates and Times module teaches you how to work with date and time data using Python’s time
and datetime
modules. You'll learn to manipulate date and time objects, format strings, and perform calculations based on time intervals.
In File Processing, you'll learn to handle files, including opening, reading, writing, and manipulating them using Python. You'll explore the os
module for file operations and practice exercises to manage files efficiently.
The course also covers PEP8 and Pylint, helping you write clean, readable, and maintainable code by following Python's style guide and using linting tools to check for errors and enforce coding standards.
By the end of this course, you'll have a solid foundation in Python programming, enabling you to build applications, manipulate data, and automate tasks effectively. You'll be prepared to tackle advanced Python topics and apply your skills in diverse professional environments.
- How Python works.
- Python's place in the world of programming languages.
- Python literals.
- Python comments.
- Variables and Python data types.
- Simple modules.
- Outputting data with
print()
. - Collecting user input.
- Defining and calling functions.
- Parameters and arguments.
- Variable scope.
- Creating and importing modules.
- Math in Python.
- The
math
andrandom
modules. - String basics.
- Special characters.
- Multi-line strings.
- Indexing and slicing strings.
- Common string operators and methods.
- Formatting strings.
- Built-in string functions.
- Lists, tuples, ranges, dictionaries, and sets.
- The
*args
and**kwargs
parameters. - Virtual environments.
- Installing packages with
pip
. - Conditions and loops.
- Generator functions.
- List comprehensions.
- Exception handling.
- The time and datetime modules.
- Working with files and directories.
- Working with the
os
andos.path
modules. - PEP8 and Pylint.
Private classes are delivered for groups at your offices or a location of your choice.
Learn at your own pace with 24/7 access to an On-Demand course.
- 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
Each student will receive a comprehensive set of materials, including course notes and all the class examples.
Experience in the following would be useful for this Python class:
- Some programming experience.
Live Private Class
- Private Class for your Team
- Live training
- Online or On-location
- Customizable
- Expert Instructors
Self-Paced Course
- On Demand 24/7
- Readings
- Presentations
- Exercises
- Quizzes
- Full Year of Access
- Learn more