Description
Help students move from understanding what functions are to defining their own functions in Python with this classroom-ready Computer Science Principles (CSP) worksheet.
In Lesson 7.2 — Defining Functions, students learn how to create custom functions using the def keyword, focusing on function structure, naming conventions, indentation, and common errors. This lesson builds directly on Lesson 7.1 and emphasizes conceptual understanding before complexity, preparing students for parameters and return values later in the unit.
Designed in the Mr. H Codes instructional style, this resource is clear, structured, student-friendly, and sub-ready, making it easy to implement with confidence.
🔹 Students Will Learn To
- Write simple functions using def in Python
- Identify and label the parts of a function definition
- Predict function behavior when a function is called
📄 What’s Included
✔ Guided notes with clear Python examples
✔ Function-part labeling activity (def, name, colon, indentation, body)
✔ Vocabulary matching activity
✔ Concept-based (unplugged) reasoning questions
✔ Code analysis & debugging practice
✔ JDoodle coding task with challenge extension
✔ Reflection prompts
✔ Complete teacher guide with pacing, tips, misconceptions, and answer key
🧠 Best For
- Computer Science Principles (CSP)
- Python-based CS courses
- Grades 9–12
- Intro to functions & program organization
- Classwork, sub plans, or homework
⏱️ Time Required
One class period (50–75 minutes)
🖥️ Programming Language
Python
CSP Python – Lesson 7.2: Defining Function | Structure & Code Organization
Highlights
Save even more with bundles
Description
Help students move from understanding what functions are to defining their own functions in Python with this classroom-ready Computer Science Principles (CSP) worksheet.
In Lesson 7.2 — Defining Functions, students learn how to create custom functions using the def keyword, focusing on function structure, naming conventions, indentation, and common errors. This lesson builds directly on Lesson 7.1 and emphasizes conceptual understanding before complexity, preparing students for parameters and return values later in the unit.
Designed in the Mr. H Codes instructional style, this resource is clear, structured, student-friendly, and sub-ready, making it easy to implement with confidence.
🔹 Students Will Learn To
- Write simple functions using def in Python
- Identify and label the parts of a function definition
- Predict function behavior when a function is called
📄 What’s Included
✔ Guided notes with clear Python examples
✔ Function-part labeling activity (def, name, colon, indentation, body)
✔ Vocabulary matching activity
✔ Concept-based (unplugged) reasoning questions
✔ Code analysis & debugging practice
✔ JDoodle coding task with challenge extension
✔ Reflection prompts
✔ Complete teacher guide with pacing, tips, misconceptions, and answer key
🧠 Best For
- Computer Science Principles (CSP)
- Python-based CS courses
- Grades 9–12
- Intro to functions & program organization
- Classwork, sub plans, or homework
⏱️ Time Required
One class period (50–75 minutes)
🖥️ Programming Language
Python










