In this Python training course, students learn to program in Python. The course is aimed at students new to the language who may or may not have experience with other programming languages. The course was written using Python 3.8, but is relevant for all students using Python 3.
How Python works.
Python's place in the world of programming languages.
Variables and Python data types.
Outputting data with print().
Collecting user input.
Defining and calling functions.
Parameters and arguments.
Creating and importing modules.
Math in Python.
The math and random modules.
Indexing and slicing strings.
Common string operators and methods.
Built-in string functions.
Lists, tuples, ranges, dictionaries, and sets.
The *args and **kwargs parameters.
Installing packages with pip.
Conditions and loops.
The time and datetime modules.
Working with files and directories.
Working with the os and os.path modules.
PEP8 and Pylint.
Available Delivery Methods
Private Class Private classes are delivered for groups at your offices or a location of your choice.
Self-Paced Learn at your own pace with 24/7 access to an On-Demand course.
Getting Familiar with the Terminal
Running a Python File
Exercise: Hello, world!
Exercise: Exploring Types
Exercise: A Simple Python Script
Constants and Deleting Variables
Writing a Python Module
Collecting User Input
Exercise: Hello, You!
Reading from and Writing to Files
Exercise: Working with Files
Functions and Modules
Exercise: A Function with Parameters
Exercise: Parameters with Default Values
Methods vs. Functions
Exercise: Floor and Modulus
Precedence of Operations
Built-in Math Functions
The math Module
The random Module
Exercise: How Many Pizzas Do We Need?
Exercise: Dice Rolling
Quotation Marks and Special Characters
Exercise: Indexing Strings
Exercise: Slicing Strings
Concatenation and Repetition
Combining Concatenation and Repetition
Python Strings are Immutable
Common String Methods
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
Sequences and Random
Exercise: Remove and Return Random Element
Converting Sequences to Lists
Exercise: Simple Rock, Paper, Scissors Game
Exercise: Slicing Sequences
min(), max(), and sum()
Converting between Sequences and Strings
The len() Function
Exercise: Creating a Dictionary from User Input
*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
The is and is not Operators
all() and any() and the Ternary Operator
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
The enumerate() Function
Exercise: Raising Exceptions
The else and finally Clauses
Using Exceptions for Flow Control
Exercise: Running Sum
Raising Your Own Exceptions
Python Dates and Times
The time Module
Times as Strings
Time and Formatted Strings
Pausing Execution with time.sleep()
The datetime Module
Exercise: What Color Pants Should I Wear?
Exercise: Report on Departure Times
Exercise: Finding Text in a File
Writing to Files
Exercise: Writing to Files
Exercise: List Creator
The os Module
The os.path Module
A Better Way to Open Files
Exercise: Comparing Lists
PEP8 and 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: