About The Course¶
The League’s Python Apprentice curriculum introduces students to the core feature of Python using professional tools like Github and Visual Studio Code. The course is aligned with the PCEP™ – Certified Entry-Level Python Programmer exam from the Python Institue, so students who have completed this course will be familiar with all of material on the test.
Modules and PCEP Alignment¶
The association between PCEP text sections and topics and the top level lessons in this course are shown below.
00_Turtles¶
The Turtles modules is a gentle introduction to Python syntax and flow of operations using the built-in turtle module.
PCEP Alignment¶
PCEP-30-01 1.1 – Understand Fundamental Terms and Definitions
Interpreting and the Interpreter, Compilation and the Compiler
Lexis, Syntax, and Semantics
PCEP-30-01 1.2 – Understand Python’s Logic and Structure
Keywords
Instructions
Indentation
Comments
01_Types_and_Logic¶
This section covers essential programming concepts related to types, logic, and decision-making in Python, aligning with the PCEP-30-01 objectives. It includes topics such as literals, numeral systems, operators, string manipulation, data type determination, and control flow using conditional statements.
PCEP Alignment¶
PCEP-30-01 1.3 – Use and Understand Different Types of Literals and Numeral Systems
Boolean, Integers, Floating-Point Numbers
Scientific Notation
Strings
Binary, Octal, Decimal, and Hexadecimal Numeral Systems
Variables
Naming Conventions
PCEP-30-01 1.4 – Choose Operators and Data Types Adequate to the Problem
Numeric Operators:
**
*
/
%
//
+
–
String Operators:
*
+
Assignment and Shortcut Operators
PCEP-30-01 2.2 – Perform Complex Input/Output Operations
The
print()
andinput()
FunctionsThe
sep=
andend=
Keyword ParametersThe
int()
,float()
,str()
, andlen()
FunctionsType Casting
PCEP-30-01 2.3 – Operate on Strings
Constructing, Assigning, Indexing, and Slicing Strings
Immutability
Quotes and Apostrophes Inside Strings
Escaping Using the
\
CharacterBasic String Functions and Methods
PCEP-30-01 2.1 – Build Complex Expressions and Determine Data Type
Unary and Binary Operators
Priorities and Binding
Bitwise Operators:
~
&
^
|
<<
>>
Boolean Operators:
not
,and
,or
Boolean Expressions
Relational Operators (
==
!=
>
>=
<
<=
)The Accuracy of Floating-Point Numbers
PCEP-30-01 3.1 – Make Decisions and Branch the Flow with the
if
InstructionConditional Statements:
if
,if-else
,if-elif
,if-elif-else
Multiple Conditional Statements
Nesting Conditional Statements
02_Loops¶
This section delves into the use of loops in Python, essential for iterating over data structures and controlling program flow. It aligns with the PCEP-30-01 objectives, covering loop construction, execution control, and the manipulation of lists for data processing.
PCEP Alignment¶
PCEP-30-01 3.2 – Perform Different Types of Loops
The
pass
InstructionBuilding Loops with
while
,for
,range()
, andin
Iterating Through Sequences
Expanding Loops with
while-else
andfor-else
Nesting Loops and Conditional Statements
Controlling Loop Execution with
break
andcontinue
PCEP-30-01 4.1 – Collect and Process Data Using Lists
Constructing Vectors
Indexing and Slicing
The
len()
FunctionList Methods:
append()
,insert()
,index()
, etc.Functions:
len()
,sorted()
The
del
InstructionIterating Through Lists with the
for
LoopInitializing Loops
The
in
andnot in
OperatorsList Comprehensions
Copying and Cloning
Lists in Lists: Matrices and Cubes
03_Data_Structures_Functions¶
This section explores essential Python data structures like tuples and dictionaries, highlighting their characteristics and operations. It also covers function definition, invocation, and the interaction between functions and their environments.
PCEP Alignment¶
PCEP-30-01 4.2 – Collect and Process Data Using Tuples
Tuples: Indexing, Slicing, Building, Immutability
Tuples vs. Lists: Similarities and Differences
Lists Inside Tuples and Tuples Inside Lists
PCEP-30-02 4.3 – Collect and Process Data Using Dictionaries
Dictionaries: Building, Indexing, Adding and Removing Keys
Iterating Through Dictionaries and Their Keys and Values
Checking the Existence of Keys
Methods:
keys()
,items()
, andvalues()
PCEP-30-01 5.1 – Decompose the Code Using Functions
Defining and Invoking User-Defined Functions and Generators
The
return
Keyword, Returning ResultsThe
None
KeywordRecursion
PCEP-30-01 5.2 – Organize Interaction Between the Function and Its Environment
Parameters vs. Arguments
Positional, Keyword, and Mixed Argument Passing
Default Parameter Values
Name Scopes, Name Hiding (Shadowing), and the
global
Keyword