Beginning Python¶
Title: Beginning Python — From Blocks to Code with Monty
Target Audience: Elementary and middle school students, approximately ages 10–14, who have completed at least one semester of block-based programming (e.g., Scratch, Snap!, or MIT App Inventor) and are ready to transition to text-based programming.
Prerequisites: Familiarity with block-based programming concepts such as sequences, loops, conditionals, and variables (e.g., Scratch or equivalent). No prior text-based programming experience is required. Basic reading and arithmetic skills at a 4th-grade level. Keyboarding skills are helpful. Students should be able to use the copy/paste functions or have the help of an adult or mentor.
Course Overview¶
Beginning Python is a fun, project-driven course that guides young programmers on the journey from block-based coding to writing real Python. Throughout the course, students are accompanied by Monty, a friendly and curious python-snake mascot who introduces new concepts, offers hints, celebrates successes, and helps make abstract ideas concrete. Monty lives right inside the course pages — students can read Monty's tips alongside interactive coding windows powered by Skulpt, a browser-based Python engine that lets learners run Python code without installing anything.
The course begins where students already are — using turtle graphics to draw shapes, just as they may have done in Scratch — and then progressively builds toward text-based thinking: variables, loops, functions, and data structures. Along the way, students encounter colorful projects like animated drawings, random-art generators, interactive color pickers, recursive fractals, and maze-solving algorithms. Each concept is introduced with a short story from Monty, an interactive example students can run and modify immediately, and a short quiz to reinforce retention.
Beyond the beginning level, the course extends into intermediate Python (data types, dictionaries, file I/O, regular expressions, object-oriented basics, debugging, and graph algorithms) and advanced Python (data visualization with matplotlib, numerical computing with NumPy, image processing, and an introduction to machine learning with the MNIST handwritten-digit dataset). A comprehensive glossary, an FAQ section, per-lesson quizzes, and a detailed teacher's guide make the course equally valuable for self-directed students and classroom instructors.
This course matters because Python is consistently ranked the most popular first programming language in the world, powers breakthroughs in science, data analysis, and artificial intelligence, and is the language of choice for Raspberry Pi projects and the Maker community. By starting with turtle graphics — a visual, immediate form of feedback — and scaffolding carefully toward data structures and machine learning, this course gives young learners a genuine on-ramp to modern, professional programming skills while keeping the experience joyful and motivating.
Main Topics Covered¶
- Python environments and tools — Skulpt (inline), Repl.it, Thonny, VS Code, Jupyter Notebooks, Raspberry Pi, and installing Python locally
- Core Python syntax — print, comments, indentation, keywords, variables, assignment, naming conventions, and basic arithmetic
- Data types — integers, floats, booleans, strings, None, and type conversion
- Control flow — if/elif/else conditionals, for loops, while loops, break, continue, nested loops, and range()
- Functions — defining and calling functions, parameters, return values, scope, recursion, docstrings, and lambda functions
- Collections — lists, tuples, dictionaries, and sets with all common operations
- Turtle graphics — drawing, movement, color, fill, animation, event handling, fractals, and the sine wave
- User input and string handling — input(), string methods, f-strings, formatting, regular expressions, and text file I/O
- Modules and the standard library — random, math, time, sys, os, string, re, and creating custom modules
- Error handling and debugging — syntax vs. runtime vs. logic errors, try/except, traceback reading, assert, and debugging strategies
- Object-oriented programming (intro) — classes, objects, attributes, methods,
__init__,self, and inheritance basics - Data structures and algorithms — stacks, queues, graphs, adjacency lists, Breadth-First Search (BFS), Depth-First Search (DFS), maze solving, sorting, and binary search
- Data visualization — matplotlib line plots, labels, grids, and plotting mathematical functions
- Numerical computing — NumPy arrays, array operations, reshaping
- Image processing — Pillow/PIL, opening and displaying images, pixel arrays
- Machine learning introduction — Keras sequential models, dense and convolutional layers, MNIST digit recognition, training, evaluation, and prediction
- Event-driven and interactive programming — mouse clicks, keyboard events, callbacks, and animation loops
- Programming practices — modularity, DRY principle, meaningful naming, version control basics, reading documentation
- Course support materials — per-lesson glossary terms, FAQ, quizzes, and a detailed teacher's guide with pacing, discussion questions, and extension activities
Topics Not Covered¶
The following topics are intentionally out of scope for this course to maintain focus on core programming fluency for a beginning audience:
- Web development (HTML, CSS, JavaScript frameworks, Flask, Django)
- Database design and SQL
- Networking and socket programming
- Concurrency, threading, and async/await
- System administration and shell scripting beyond basic terminal use
- Advanced software engineering patterns (design patterns, CI/CD pipelines)
- Cloud deployment and containerization (Docker, Kubernetes)
- Cybersecurity and penetration testing
- Full deep-learning training pipelines beyond the MNIST introductory example
- Mobile app development
Learning Outcomes¶
After completing this course, students will be able to:
Remember¶
Retrieving, recognizing, and recalling relevant knowledge from long-term memory.
- Recall that Python uses indentation (whitespace) to define blocks of code
- Name the six core Python data types: int, float, str, bool, list, and dict
- List the arithmetic operators available in Python:
+,-,*,/,//,%,** - Identify the keywords used for control flow:
if,elif,else,for,while,break,continue - State the difference between a syntax error, a runtime error, and a logic error
- Recall the turtle graphics commands for movement, pen control, color, and fill
- Name at least five Python standard library modules and one function from each
- Recognize the purpose of
import,def,return,class,try, andexceptkeywords - List the main operations available for lists (append, insert, remove, pop, sort, reverse)
- Recall the difference between mutable types (lists, dicts) and immutable types (strings, tuples)
- State what BFS and DFS stand for and identify which uses a queue and which uses a stack
- Name the six levels of Bloom's Taxonomy in order
- Identify Monty's role in the course as a learning guide and hint-giver
Understand¶
Constructing meaning from instructional messages, including oral, written, and graphic communication.
- Explain why Python's indentation-based block structure reduces the need for braces or
begin/endkeywords - Describe how a
forloop withrange()translates to a block-based repeat loop in Scratch - Explain the difference between passing a value to a function (parameter) and returning a value from it
- Interpret a Python traceback and explain what information each line provides
- Describe how a dictionary stores key-value pairs and why keys must be unique
- Explain what recursion means and identify the base case and recursive case in a given function
- Summarize how turtle graphics coordinates map to an x-y plane with the origin at the center
- Describe what it means for a variable to have local scope vs. global scope
- Explain the purpose of try/except blocks and when they are appropriate to use
- Interpret a regular expression pattern and describe what strings it would match
- Describe the difference between supervised and unsupervised machine learning
- Explain how the MNIST dataset is used to train a digit-recognition model
- Summarize the difference between a list (ordered, mutable) and a tuple (ordered, immutable) and a set (unordered, unique)
- Explain how BFS guarantees the shortest path in an unweighted graph
Apply¶
Carrying out or using a procedure in a given situation.
- Write Python programs using print(), variables, arithmetic, and input() to create a simple calculator
- Use
if/elif/elsestatements to control program flow based on user input or computed values - Apply
forandwhileloops to draw geometric shapes with turtle graphics - Define and call functions with parameters and return values to organize and reuse code
- Use list methods (append, pop, sort, etc.) to build, modify, and search collections of data
- Apply dictionary operations to store and retrieve named data (e.g., a student grade book)
- Write a recursive function to draw a fractal tree or spiral using turtle graphics
- Use the
randommodule to generate random colors, positions, and values in a drawing program - Apply the
mathmodule to compute sine and cosine values and plot a wave with turtle - Use
open()and thewithstatement to read text from a file and process each line - Apply
try/exceptto handle invalid user input gracefully without crashing - Use
re.search()andre.findall()to extract patterns from text - Apply list comprehensions and dictionary comprehensions to transform data concisely
- Use
matplotlib.pyplotto create a labeled line plot of mathematical data - Apply NumPy arrays to perform element-wise math operations on numerical data
- Use Keras to load the MNIST dataset, build a sequential model, compile, and train it
- Apply BFS or DFS to find a path through a grid-based maze
Analyze¶
Breaking material into constituent parts and determining how the parts relate to one another and to an overall structure or purpose.
- Compare Python's text-based syntax to equivalent Scratch blocks and explain what each Python construct replaces
- Distinguish between a function definition and a function call, and explain why both are necessary
- Analyze a given Python program and identify its inputs, processing steps, and outputs
- Trace the execution of a recursive function call through its base case and recursive cases step by step
- Differentiate between when to use a list, a tuple, a dictionary, or a set for a given problem
- Identify the scope of variables in a multi-function program and predict whether a
NameErrorwill occur - Analyze a BFS traversal of a graph and identify the order in which nodes are visited
- Examine a neural network's layer structure (input, hidden, output) and explain the role of each layer
- Break down a turtle graphics program into its sub-components (setup, drawing functions, event handlers) and describe how they interact
- Differentiate between a compile-time (syntax) error and a runtime error in terms of when each is detected
- Analyze a regular expression pattern by identifying each character class, quantifier, and anchor
- Compare the performance characteristics of BFS vs. DFS (memory use, path optimality, use cases)
- Examine a program's use of global and local variables and identify potential bugs from unintended scope interactions
Evaluate¶
Making judgments based on criteria and standards through checking and critiquing.
- Judge whether a given variable name follows Python conventions and suggest improvements
- Assess whether a function is appropriately modular or should be broken into smaller functions
- Evaluate two approaches to solving a problem (e.g., iteration vs. recursion) and justify which is more appropriate for a given context
- Critique a piece of student code for common errors: off-by-one in range(), missing return, mutable default argument, shadowed variable
- Select the appropriate data structure (list, dict, set, tuple) for a given real-world scenario and defend the choice
- Assess whether a try/except block catches the right exceptions and whether the except clause is too broad or too narrow
- Evaluate a matplotlib chart for clarity and completeness (title, axis labels, readable scale)
- Judge the quality of a trained MNIST model based on its accuracy score and loss curve
- Appraise the readability of a Python program and suggest improvements to naming, structure, and comments
- Evaluate whether BFS or DFS is the better algorithm for a specific maze or graph problem
- Assess the completeness and accuracy of a regular expression against a set of test strings
- Judge whether a recursive function has a correct and reachable base case
Create¶
Putting elements together to form a coherent or functional whole; reorganizing elements into a new pattern or structure.
- Design and build an original turtle graphics artwork program that uses functions, loops, color, and random elements
- Construct a Python program that reads a text file, processes the data using string methods and regular expressions, and writes a summary report
- Develop a custom Python module with at least three reusable functions and import it into a separate program
- Create a fully functional interactive color-picker application using turtle event handling
- Build a recursive fractal drawing (tree, snowflake, or spiral) and tune the depth and branching parameters
- Design a dictionary-based data application (e.g., a simple inventory system, word frequency counter, or grade tracker) using loops, conditionals, and file I/O
- Implement a BFS or DFS maze solver that reads a maze from a data structure, finds the shortest path, and visualizes the solution with turtle graphics
- Construct a data visualization dashboard using matplotlib that plots at least two datasets with labeled axes and a legend
- Create a simple class with
__init__, attributes, and methods, and use it to model a real-world entity (e.g., a turtle race competitor, a quiz question, a playing card) - Build and train a Keras neural network to classify handwritten digits from the MNIST dataset and report its test accuracy
- Design an original end-to-end Python project that integrates concepts from at least three course sections (e.g., turtle graphics + file I/O + randomness, or data visualization + NumPy + matplotlib)
- Produce a complete teacher's-guide-quality lesson plan for one course topic, including learning objectives, sample code, discussion questions, and a quiz
Course Materials Included¶
- Glossary: A comprehensive glossary of 200+ Python and computer science terms, with plain-language definitions written at a 5th-grade reading level, with examples
- FAQ: A frequently-asked-questions section addressing the most common points of confusion for students transitioning from block-based to text-based programming
- Quizzes: Short, auto-graded quizzes (5–10 questions) at the end of each lesson covering recall, understanding, and application of the lesson's key concepts
- Teacher's Guide: A detailed guide for instructors including pacing recommendations, prerequisite concept maps, discussion prompts, common misconceptions, extension activities, assessment rubrics, and alignment to CS education standards (CSTA K-12)
- Monty the Mascot: Inline mascot tips, hints, and encouragement throughout every lesson, rendered as styled callout boxes alongside the Skulpt interactive coding windows