# Coding Events > Fifth graders learn events — things that happen (a click, a key press, a score reached) that trigger code to run. “When the flag is clicked… start.” They… **Computer Science** | **Grade 5** *A free lesson plan from K12 Academics. Source page: https://lessonplans.k12academics.com/k12-lesson-g5-cs-events.html* Fifth graders learn events — things that happen (a click, a key press, a score reached) that trigger code to run. “When the flag is clicked… start.” They match events to the actions they cause, then wire up their own. **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 an **event** is. - Match events to **actions**. - Use a “when ___” **event block**. - Make a program react. How do programs respond to things that happen? ## Match the Event to the Action Project this and match each event to what it makes happen — tap the event, then tap the action. ## 45 minutes, five moves Tap any phase to open the teacher moves and student actions. ### Hook — When This, Do That What makes a game start, or a character jump? #### 👩‍🏫 Teacher Moves - Click a flag; press a key. - Ask “what made that happen?” - Set the goal. #### 🎒 Student Actions - Watch. - Guess. - Get ready. ### Use — Events Students use events. #### 👩‍🏫 Teacher Moves - Send students to Match the Event. - Match each one. - Note “when ___” triggers code. #### 🎒 Student Actions - Match. - Say. - Note it. ### Modify — Swap the Action Students modify. #### 👩‍🏫 Teacher Moves - Change what the up-arrow does. - Make a click play a different sound. - Test the change. #### 🎒 Student Actions - Change. - Change. - Test. ### Create — Make Your Own Students create. #### 👩‍🏫 Teacher Moves - Pick an event (key, click, score). - Choose an action. - Wire “when ___ → do ___.” #### 🎒 Student Actions - Pick. - Choose. - Wire it. ### Reflect — Reflect Students close. #### 👩‍🏫 Teacher Moves - Say what an event is. - Name an event in a game. - Complete the exit ticket. #### 🎒 Student Actions - Say it. - Name one. - 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. Create programs with sequences, events, loops & conditionals. Modify or remix programs to develop something new. Test and debug a program to ensure it runs. Use events to build interactive solutions. ## One lesson, every learner ### Multilingual Learners - Act out “when I clap, you jump.” - Frame: “when ___, then ___.” - Match pictures first. ### Support & Access - Start with the flag event. - Match one pair at a time. - Use block cutouts. ### Stretch & Extend - Add two events to one sprite. - Chain an event to a variable. - Explain events vs loops. ### What to gather - 📽️Screen / board - ⚡Event & action cards - 💻Match the Event - 🎮Scratch or paper blocks - 📓Notebooks - 🎫Exit-ticket slips ### Key terms - **event**: something that happens that triggers code - **trigger**: to cause code to run - **when block**: a block that starts code on an event - **click**: a mouse event - **key press**: a keyboard event - **action**: what the code does in response - **interactive**: responds to the user - **sprite**: a character or object you can control ## Exit Ticket Preview the three formative checks. Tap “Sample answer” to see what mastery looks like — hide them before you print for students. ### Reflect: events. Have students name one event and the action it triggers in a game they like. A printable events worksheet is in the Computer Science library. ## Check your understanding **1. What does “event” mean?** - what the code does in response - a keyboard event - something that happens that triggers code *(correct)* - a mouse event “event” means: something that happens that triggers code **2. Which word means: “to cause code to run”?** - click - action - trigger *(correct)* - key press “trigger” means: to cause code to run **3. What does “when block” mean?** - a block that starts code on an event *(correct)* - a character or object you can control - a mouse event - a keyboard event “when block” means: a block that starts code on an event **4. Which word means: “a mouse event”?** - sprite - interactive - key press - click *(correct)* “click” means: a mouse event **5. What does “key press” mean?** - a keyboard event *(correct)* - what the code does in response - something that happens that triggers code - to cause code to run “key press” means: a keyboard event **6. Which word means: “what the code does in response”?** - when block - action *(correct)* - event - trigger “action” means: what the code does in response ## Printable worksheet --- Full lesson page: https://lessonplans.k12academics.com/k12-lesson-g5-cs-events.html All lessons: https://lessonplans.k12academics.com/