# Functions with Parameters > Eleventh graders deepen their programming with functions that take parameters and return values — the building blocks of reusable, well-organized code. **Computer Science** | **Grade 11** *A free lesson plan from K12 Academics. Source page: https://lessonplans.k12academics.com/k12-lesson-g11-cs-functions.html* Eleventh graders deepen their programming with functions that take parameters and return values — the building blocks of reusable, well-organized code. **Copy link** works with Canvas, Schoology, Moodle and any other LMS — paste it in as a resource or assignment. ## Everything you need before the bell rings ### Learning Objectives Students will be able to… - Explain a **parameter**. - Explain a **return value**. - Reuse a **function**. - Write clean code. A great function is like a machine: you feed it inputs (parameters) and it gives back an output (return value). How do they work? ## Functions with Parameters Check Project each item and have students answer about parameters and return values. ## 55 minutes, five moves Tap any phase to open the teacher moves and student actions. ### Hook — Inputs and Outputs A function is a machine: inputs (parameters) in, output (return) out. How? #### 👩‍🏫 Teacher Moves - Show a function call. - Ask about its inputs. - Set up. #### 🎒 Student Actions - Look. - Consider. - Get ready. ### Unplugged — Unplug It Students practice. #### 👩‍🏫 Teacher Moves - Act as a “function” taking inputs. - Return an output. - Reuse with new inputs. #### 🎒 Student Actions - Take input. - Return it. - Reuse. ### Use — Trace It Students use. #### 👩‍🏫 Teacher Moves - Send students to Functions with Parameters Check. - Note parameter vs. return. - Trace a call. #### 🎒 Student Actions - Answer. - Note it. - Trace. ### Modify — Modify Students modify. #### 👩‍🏫 Teacher Moves - Add a parameter to a function. - Return a value. - Reuse it. #### 🎒 Student Actions - Add it. - Return it. - Reuse. ### Create — Create Students create. #### 👩‍🏫 Teacher Moves - Write a function with a parameter. - Return a result. - Complete the exit ticket. #### 🎒 Student Actions - Write it. - Return it. - Complete the exit ticket. ## Built to the standards you report on Aligned to the CSTA K-12 Computer Science Standards (Level 3) and ISTE Standards. Design reusable functions. Use parameters and return values. Modularize with functions. Computational Thinker. ## One lesson, every learner ### Multilingual Learners - Function diagram cards. - Sentence frame: “A parameter is ___.” - Use a worked example. ### Support & Access - Start with input vs. output. - Use one example. - Trace a simple call. ### Stretch & Extend - Use multiple parameters. - Return complex data. - Refactor repeated code. ### What to gather - 📽️Projector / board - 💻A coding environment - 💻Functions with Parameters Check - 📄Code handouts - ✏️Pens - 🎫Exit-ticket slips ### Key terms - **function**: a reusable block of code - **parameter**: an input to a function - **argument**: the value passed in - **return value**: the output sent back - **reuse**: to use again - **modular**: built from parts - **call**: to run a function - **scope**: where a variable is used ## Exit Ticket Preview the three formative checks. Tap “Sample answer” to see what mastery looks like — hide them before you print for students. ### Create: build a function. Have students write a function that takes a parameter and returns a value. A printable functions sheet is in the Computer Science library. ## Check your understanding **1. What does “function” mean?** - a reusable block of code *(correct)* - the value passed in - built from parts - where a variable is used “function” means: a reusable block of code **2. Which word means: “an input to a function”?** - scope - parameter *(correct)* - function - reuse “parameter” means: an input to a function **3. What does “argument” mean?** - to run a function - where a variable is used - the value passed in *(correct)* - built from parts “argument” means: the value passed in **4. Which word means: “the output sent back”?** - function - modular - return value *(correct)* - reuse “return value” means: the output sent back **5. What does “reuse” mean?** - to run a function - a reusable block of code - to use again *(correct)* - the output sent back “reuse” means: to use again **6. Which word means: “built from parts”?** - modular *(correct)* - parameter - call - scope “modular” means: built from parts ## Printable worksheet --- Full lesson page: https://lessonplans.k12academics.com/k12-lesson-g11-cs-functions.html All lessons: https://lessonplans.k12academics.com/