# Coding Functions > Fifth graders learn functions — a way to name a group of steps once and reuse it again and again. They build a greet() function in order, then call it, so… **Computer Science** | **Grade 5** *A free lesson plan from K12 Academics. Source page: https://lessonplans.k12academics.com/k12-lesson-g5-cs-functions.html* Fifth graders learn functions — a way to name a group of steps once and reuse it again and again. They build a greet() function in order, then call it, so they never have to rewrite the same steps. **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 what a **function** is. - Put steps inside a **named function**. - Call a function to **reuse it**. - See why functions save work. How can you name a group of steps and reuse it? ## Build the greet() Function Project this and have students put the steps inside the function in the right order. ## 45 minutes, five moves Tap any phase to open the teacher moves and student actions. ### Hook — Why Repeat Yourself? What if you had to greet 10 people with the same 3 steps? #### 👩‍🏫 Teacher Moves - Write the 3 greeting steps. - Ask “how could we reuse them?” - Set the goal. #### 🎒 Student Actions - Watch. - Guess. - Get ready. ### Use — Functions Students use functions. #### 👩‍🏫 Teacher Moves - Send students to Build the greet() Function. - Order the steps. - Name it greet(). #### 🎒 Student Actions - Order. - Say. - Name it. ### Modify — Call It Twice Students modify. #### 👩‍🏫 Teacher Moves - Call greet() once. - Call greet() again — same steps! - Count lines saved. #### 🎒 Student Actions - Call. - Call. - Count. ### Create — Make Your Own Students create. #### 👩‍🏫 Teacher Moves - Design a function (e.g. cheer()). - List its steps. - Give it a clear name. #### 🎒 Student Actions - Design. - List. - Name. ### Reflect — Reflect Students close. #### 👩‍🏫 Teacher Moves - Say what a function is. - Say why it saves work. - Complete the exit ticket. #### 🎒 Student Actions - Say it. - Say. - Complete the exit ticket. ## Built to the standards you report on Aligned to the CSTA K-12 Computer Science Standards and the ISTE Standards for Students. Decompose a problem into smaller named parts. Create programs with sequences, events, loops & conditionals. Modify or remix programs to develop something new. Break problems into reusable parts. ## One lesson, every learner ### Multilingual Learners - Act the steps out as a “routine.” - Frame: “First… then… finally…” - Name functions with verbs. ### Support & Access - Use 3 steps, not 4. - Order two at a time. - Use picture cards. ### Stretch & Extend - Add an input (greet a name). - Write a 2nd function. - Call both in one program. ### What to gather - 📽️Screen / board - 🧱Step cards - 💻Build the greet() Function - 🎮Scratch or paper code - 📓Notebooks - 🎫Exit-ticket slips ### Key terms - **function**: a named group of steps you can reuse - **define**: to create a function and its steps - **call**: to run a function by its name - **reuse**: to use the same code again - **name**: what you call the function - **step**: one instruction inside the function - **input**: a value you pass into a function - **decompose**: to break a task into smaller parts ## Exit Ticket Preview the three formative checks. Tap “Sample answer” to see what mastery looks like — hide them before you print for students. ### Reflect: functions. Have students name one function a game might reuse (like jump() or shoot()). A printable functions worksheet is in the Computer Science library. ## Check your understanding **1. What does “function” mean?** - a named group of steps you can reuse *(correct)* - a value you pass into a function - to use the same code again - what you call the function “function” means: a named group of steps you can reuse **2. Which word means: “to create a function and its steps”?** - input - reuse - function - define *(correct)* “define” means: to create a function and its steps **3. What does “call” mean?** - to run a function by its name *(correct)* - one instruction inside the function - to break a task into smaller parts - a value you pass into a function “call” means: to run a function by its name **4. Which word means: “to use the same code again”?** - name - call - function - reuse *(correct)* “reuse” means: to use the same code again **5. What does “name” mean?** - one instruction inside the function - to break a task into smaller parts - what you call the function *(correct)* - to run a function by its name “name” means: what you call the function **6. Which word means: “one instruction inside the function”?** - step *(correct)* - function - define - name “step” means: one instruction inside the function ## Printable worksheet --- Full lesson page: https://lessonplans.k12academics.com/k12-lesson-g5-cs-functions.html All lessons: https://lessonplans.k12academics.com/