Beginning Python — Concept List v1¶
This concept list was derived from the existing manually created course content in the docs/ directory
and supplemented with additional concepts appropriate for a beginning Python course.
The original textbook was created by hand by humans starting around May of 2020 when Trinket was
the best practice for teaching introduction to Python with Turtle graphics. This
course was used in the CoderDojo Twin Cities coding clubs and the Code Savvy clubs for many years.
It serves as the foundation for the learning graph used to regenerate the course in June of 2026
using Claude Code Opus 2.6 in High effort mode.
1. Development Environments & Setup¶
- Python interpreter overview
- Python 2 vs Python 3 differences
- Trinket.io — web-based Python environment
- repl.it — online Python IDE
- Thonny — beginner-friendly Python IDE
- Spyder IDE — scientific Python IDE
- VS Code — general-purpose code editor
- Jupyter Notebooks — interactive computational environment
- JupyterLab — enhanced Jupyter environment
- Conda — environment and package manager
- pip — Python package installer
- Virtual environments
- Installing Python locally
- Running Python scripts from the terminal
- The Python REPL (interactive shell)
- Raspberry Pi as a Python platform
2. Basic Syntax & Output¶
- print() function
- Comments (single-line with
#) - Multi-line strings (triple quotes)
- Indentation as syntax (whitespace rules)
- Case sensitivity in Python
- Python keywords (reserved words)
- Blank lines and code readability
3. Variables & Assignment¶
- Variable definition and assignment (
=) - Variable naming rules (letters, digits, underscores)
- Snake_case naming convention
- Meaningful variable names
- Multiple assignment (
a, b = 1, 2) - Augmented assignment operators (
+=,-=,*=,/=) - Constants (by convention, ALL_CAPS)
4. Data Types¶
Numeric¶
- Integers (
int) — whole numbers, positive and negative - Floats (
float) — decimal numbers - Division always returns float in Python 3
- Integer division (
//) - Modulo operator (
%) — remainder after division - Exponentiation (
**) - Arithmetic operators:
+,-,*,/
Boolean¶
- Boolean type (
bool) —TrueandFalse - Comparison operators:
>,<,>=,<=,==,!= - Logical operators:
and,or,not - Truthiness and falsiness of values
Strings¶
- String type (
str) — text enclosed in quotes - Single vs double quotes
- String concatenation with
+ - String repetition with
* - String indexing (0-based)
- String slicing (
s[start:end:step]) - Escape characters (
\n,\t,\\,\") - String length with
len() - String methods:
.lower(),.upper(),.strip(),.lstrip(),.rstrip() - String methods:
.split(),.join(),.replace() - String methods:
.startswith(),.endswith(),.find(),.count() - String methods:
.isdigit(),.isalpha(),.isalnum() - String formatting with
.format() - f-strings (formatted string literals)
- String immutability
None¶
None— null/empty value,NoneType- Functions without
returnreturnNone - Checking for
Nonewithis None
5. Type Conversion (Casting)¶
int()— convert to integerfloat()— convert to floatstr()— convert to stringbool()— convert to booleantype()— inspect a variable's typeisinstance()— check if object is an instance of a type
6. User Input¶
input()function — read text from user- Prompting the user (passing a string to
input()) - Converting input strings to numbers with
int()/float() - Input validation basics
7. Control Flow — Conditionals¶
ifstatementif...elseblockelif(else-if) chains- Nested
ifstatements - Conditional expressions (ternary):
x if condition else y match/casestatement (Python 3.10+, structural pattern matching)
8. Control Flow — Loops¶
forloop — iterating over a sequenceforloop withrange()range(start, stop, step)whileloop — condition-based repetitionbreak— exit a loop earlycontinue— skip to next iterationelseclause on loops- Nested loops
- Loop counter variable (
i,j) - Infinite loops and how to avoid them
enumerate()— iterate with index and valuezip()— iterate over multiple sequences simultaneously
9. Functions¶
- Defining a function with
def - Calling a function
- Function parameters (positional)
- Default parameter values
- Keyword arguments
returnstatement- Functions that return
Noneimplicitly - Local scope — variables inside functions
- Global scope — variables at module level
globalkeyword — access global variable inside functionnonlocalkeyword — access enclosing scope variable- Docstrings — documenting functions
- Pure functions vs functions with side effects
- Recursion — a function calling itself
- Recursion base case and recursive case
- Recursion depth and stack overflow
- Lambda functions (anonymous functions)
10. Collections — Lists¶
- List type (
list) — ordered, mutable collection - Creating a list with
[] - List indexing (0-based, negative indexing)
- List slicing
len()— number of items in a list- List methods:
.append(),.insert(),.extend() - List methods:
.remove(),.pop(),.clear() - List methods:
.sort(),.reverse(),.copy() - List methods:
.index(),.count() - Checking membership with
in - List concatenation and repetition
- Iterating over a list with
for - Nested lists (lists of lists)
- List comprehensions
11. Collections — Tuples¶
- Tuple type (
tuple) — ordered, immutable collection - Creating a tuple with
() - Tuple indexing and slicing
- Tuple unpacking
- When to use tuples vs lists
- Single-element tuple syntax (
(x,))
12. Collections — Dictionaries¶
- Dictionary type (
dict) — key-value pairs - Creating a dictionary with
{} - Accessing values by key (
d[key]) .get()method — safe key access with default- Adding and updating key-value pairs
- Removing entries:
.pop(),del - Dictionary methods:
.keys(),.values(),.items() - Iterating over a dictionary
- Checking key membership with
in - Nested dictionaries
- Dictionary comprehensions
13. Collections — Sets¶
- Set type (
set) — unordered collection of unique items - Creating a set with
{}orset() - Set operations: union (
|), intersection (&), difference (-) .add(),.remove(),.discard()methods- Checking membership with
in - Frozensets (immutable sets)
14. Built-in Functions¶
print()— output to consoleinput()— read user inputlen()— length of a sequencerange()— generate a sequence of numberstype()— get type of an objectint(),float(),str(),bool()— type conversionslist(),tuple(),set(),dict()— collection constructorsmax(),min()— find maximum/minimumsum()— sum values in an iterableabs()— absolute valueround()— round a numbersorted()— return sorted listreversed()— return reverse iteratorenumerate()— iterate with indexzip()— combine iterablesmap()— apply function to each itemfilter()— filter items by conditiondir()— list attributes/methods of an objecthelp()— display documentation
15. Modules & Imports¶
importstatementfrom ... import ...— import specific namesimport ... as ...— alias a modulefrom ... import *— import all (use sparingly)- Creating custom modules (
.pyfiles) __name__ == "__main__"guard- The Python standard library overview
Standard Library Modules¶
random— random number generationrandom.randint(min, max)random.choice(sequence)random.shuffle(list)random.seed()— reproducibilitymath— mathematical functionsmath.sqrt(),math.floor(),math.ceil()math.sin(),math.cos(),math.pimath.radians()— degrees to radiansstring— string constants (punctuation, digits, etc.)time— time operationstime.sleep()— pause executionsys— system-level operationssys.path— Python module search pathos— operating system interfaceos.path— file path operationsre— regular expressions
16. Regular Expressions¶
- Importing
remodule re.search(pattern, string)— find first matchre.findall(pattern, string)— find all matchesre.split(pattern, string)— split by patternre.sub(pattern, replacement, string)— substitute matches- Common patterns:
\d(digit),\w(word char),\s(whitespace) - Anchors:
^(start),$(end) - Character classes:
[a-z],[A-Z],[0-9] - Quantifiers:
+(one or more),*(zero or more),?(optional) - Alternation with
| - Escaping special characters with
\ - Raw strings for regex patterns (
r"...")
17. File Input/Output¶
open()function- File modes:
'r'(read),'w'(write),'a'(append),'b'(binary) file.read()— read entire file as stringfile.readlines()— read all lines into a listfile.readline()— read one line at a timefile.write()— write string to filefile.close()— close file handlewithstatement (context manager) for safe file handling- Iterating over file lines with
for - String methods for text processing:
.strip(),.lower(),.replace() - CSV file reading basics
18. Error Handling¶
- Types of errors: syntax errors vs runtime errors vs logic errors
- Common exceptions:
ValueError,TypeError,IndexError,KeyError,NameError,ZeroDivisionError - Reading a traceback (stack trace)
try...exceptblockexcept ExceptionType as e— catching specific exceptionselseclause in try/exceptfinallyclause — always executesraise— raising exceptions manuallyassertstatement with error messages- Debugging with
print()statements - Using Google and Stack Overflow to debug errors
19. Object-Oriented Programming (Intro)¶
- Objects and classes — conceptual overview
- Attributes — properties of an object
- Methods — functions belonging to an object
classkeyword — defining a class__init__()— constructor methodselfparameter- Creating instances of a class
- Accessing attributes and calling methods (
obj.attr,obj.method()) - String methods as examples of OOP
- List methods as examples of OOP
- Inheritance — basics
__str__()— string representation of an object
20. Turtle Graphics¶
import turtle- Creating a
turtle.Turtle()object - Creating a
turtle.Screen()object - Screen setup:
setup(width, height),bgcolor(color),title(text) - Movement:
forward(),backward(),left(),right() - Absolute positioning:
goto(x, y),setx(),sety() - Pen control:
penup(),pendown(),pensize() - Color:
color(),pencolor(),fillcolor() - Fill:
begin_fill(),end_fill() - Drawing shapes:
circle(radius), drawing squares/polygons with loops - Turtle appearance:
shape()(turtle, arrow, circle, square, triangle, classic) - Hiding/showing turtle:
hideturtle(),showturtle() - Writing text:
write(text, font=...) - Clearing:
clear(),reset() - Position query:
xcor(),ycor(),heading() - Speed control:
speed(value) - Direction:
setheading(angle) - Event handling:
onscreenclick(function) - Animation with turtle (frame-based loops)
- Building a color picker with turtle
- Drawing fractals with recursion and turtle
- Drawing a sine wave with turtle and math
21. Data Visualization¶
matplotliblibrary overviewimport matplotlib.pyplot as pltplt.plot(x, y)— line plotplt.show()— display plotplt.title(),plt.xlabel(),plt.ylabel()— labelsplt.grid()— show grid lines- Plotting a sine wave
- Working with lists as x/y data
22. Numerical Computing (NumPy Intro)¶
numpylibrary overviewimport numpy as npnp.array()— creating arraysnp.argmax()— index of maximum value- Array operations and broadcasting basics
- Reshaping arrays (
array.reshape())
23. Image Processing (Intro)¶
- PIL (Python Imaging Library) / Pillow overview
Image.open(path)— open an imageimage.show()— display an image- Pixel data and image arrays
24. Data Structures & Algorithms¶
- Abstract data types overview
- Stack — LIFO (Last In, First Out)
- Queue — FIFO (First In, First Out)
- Queue operations: enqueue (
append()), dequeue (pop(0)) - Graph — nodes and edges
- Adjacency list representation
- Breadth-First Search (BFS) algorithm
- BFS color tracking (white, gray, black)
- BFS for path finding
- Depth-First Search (DFS) algorithm
- DFS with recursion and backtracking
- DFS and BFS for maze solving
- Sorting algorithms overview (bubble, selection, insertion)
- Binary search concept
25. Machine Learning & Neural Networks (Advanced)¶
- Machine learning overview — supervised vs unsupervised
keraslibrary overview- Sequential model
- Dense layers — fully connected layers
- Activation functions:
relu,softmax - Conv2D — convolutional layers
- MaxPooling2D — pooling layers
- Dropout — regularization to prevent overfitting
- Flatten layer — reshape for dense layers
model.compile()— loss function, optimizer, metricsmodel.fit()— training the modelmodel.evaluate()— testing accuracymodel.predict()— making predictions- Loss functions:
categorical_crossentropy - Optimizer: Adam
- Metrics: accuracy
- Batch size and epochs
- MNIST dataset — handwritten digit recognition
- Data normalization/preprocessing
- Convolutional Neural Networks (CNN)
- Feedforward networks
- Recurrent networks (RNN) — overview
- LSTM networks — overview
- Autoencoders — overview
26. Graphics in Jupyter¶
ipycanvas— canvas drawing in Jupytermobilechelonian— turtle graphics in Jupyter- Drawing shapes on a canvas
- Color bars and data visualization in Jupyter
27. Event-Driven & Interactive Programming¶
- Event-driven programming model
- Mouse click event handlers (
onscreenclick) - Keyboard event handlers (turtle
onkey) - Callback functions
- Animation loops
28. Programming Practices & Patterns¶
- Modularity — breaking code into functions
- Code reusability
- DRY principle (Don't Repeat Yourself)
- Meaningful variable and function names
- Code comments — when and why
- Literate programming with Jupyter
- Reading documentation with
help()anddir() - Version control basics (git overview)
- Searching Stack Overflow and documentation
29. Color & Graphics Concepts¶
- Named colors (red, green, blue, orange, etc.)
- Hex color values (
#FA057F) - RGB color model
- Color in turtle graphics
- Background and pen colors
Concepts Added Beyond Existing Content¶
The following concepts are recommended additions to make the course more complete for a modern beginning Python curriculum:
- f-strings (formatted string literals) — more readable than
.format() - List comprehensions — concise way to build lists
- Dictionary comprehensions
withstatement / context managers — safe resource handlingmatch/casestatement (Python 3.10+) — modern pattern matching- Lambda functions — anonymous single-expression functions
map()andfilter()— functional programming basics- Sorting with a key function (
sorted(list, key=...)) - String f-string formatting with format specifiers (e.g.,
{x:.2f}) osandos.path— file path and directory operations- CSV files — reading/writing structured data
- Exception hierarchy — understanding
Exceptionbase class raise— throwing custom errors- Class
__str__()and__repr__()methods - Inheritance — subclasses and method overriding
- DRY principle and code reuse patterns
__name__ == "__main__"guard for runnable modules- Virtual environments — keeping projects isolated
- Reading and writing JSON files (
jsonmodule)