# Events in Code > Fourth graders learn about events — things that happen (like a click, a key press, or a collision) that a program can respond to — the way code becomes… **Computer Science** | **Grade 4** *A free lesson plan from K12 Academics. Source page: https://lessonplans.k12academics.com/k12-lesson-g4-cs-events.html* Fourth graders learn about events — things that happen (like a click, a key press, or a collision) that a program can respond to — the way code becomes interactive and reacts to the user. **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… - Define an **event**. - Match events to **responses**. - See how events make programs **interactive**. - Use events in code. How does a game know to move your character when you press a key, or score a point when things bump? It responds to EVENTS. What is an event in code? ## Match the Event to Its Response Project this and match each event to what happens in response — tap an event, then tap the response. ## 40 minutes, five moves Tap any phase to open the teacher moves and student actions. ### Hook — React to Me A game reacts when you press a key — how? It responds to events. #### 👩‍🏫 Teacher Moves - Show an interactive game. - Ask how it reacts. - Set the goal. #### 🎒 Student Actions - Watch. - Wonder. - Predict. ### Unplugged — Unplug It Students practice. #### 👩‍🏫 Teacher Moves - Play “when I clap, you jump.” - Name the event and response. - Feel the idea. #### 🎒 Student Actions - Play it. - Name them. - Feel it. ### Use — Match Events Students use. #### 👩‍🏫 Teacher Moves - Send students to Match the Event. - Match each one. - Explain them. #### 🎒 Student Actions - Match. - Explain. - Check. ### Modify — Change It Students modify. #### 👩‍🏫 Teacher Moves - Change what an event does. - Predict the result. - Explain the change. #### 🎒 Student Actions - Change it. - Predict. - Explain. ### Create — Create Students conclude. #### 👩‍🏫 Teacher Moves - Design an event-response. - Explain interactivity. - Complete the exit ticket. #### 🎒 Student Actions - Design it. - Explain it. - Complete the exit ticket. ## Built to the standards you report on Aligned to the CSTA K-12 Computer Science Standards and ISTE Standards for Students. Create programs that use events to control the flow. Create programs with sequence and events. Decompose problems into events. Computational Thinker. ## One lesson, every learner ### Multilingual Learners - Event + response cards. - Sentence frame: “When ___, then ___.” - Act out events. ### Support & Access - Start with click → action. - Match one pair at a time. - Act it out. ### Stretch & Extend - Add multiple events. - Code an event in a game. - Explain event handlers. ### What to gather - 📽️Projector / board - ⚡Event cards - 💻Match the Event to Its Response - 💻Coding tool (optional) - ✏️Pencils - 🎫Exit-ticket slips ### Key terms - **event**: something that happens a program can respond to - **response**: what the program does after an event - **click**: pressing a mouse or button - **key press**: pushing a key - **interactive**: responds to the user - **trigger**: what starts an event - **input**: information from the user - **collision**: when two things touch ## Exit Ticket Preview the three formative checks. Tap “Sample answer” to see what mastery looks like — hide them before you print for students. ### Create: an event-response. Have students write one “when ___, then ___” event-response rule for a game they imagine. A printable events sheet is in the Computer Science library. ## Check your understanding **1. What does “event” mean?** - responds to the user - pressing a mouse or button - something that happens a program can respond to *(correct)* - what the program does after an event “event” means: something that happens a program can respond to **2. Which word means: “what the program does after an event”?** - key press - event - response *(correct)* - collision “response” means: what the program does after an event **3. What does “click” mean?** - information from the user - pressing a mouse or button *(correct)* - what the program does after an event - pushing a key “click” means: pressing a mouse or button **4. Which word means: “pushing a key”?** - key press *(correct)* - trigger - event - input “key press” means: pushing a key **5. What does “interactive” mean?** - responds to the user *(correct)* - what starts an event - something that happens a program can respond to - pushing a key “interactive” means: responds to the user **6. Which word means: “what starts an event”?** - input - click - collision - trigger *(correct)* “trigger” means: what starts an event ## Printable worksheet --- Full lesson page: https://lessonplans.k12academics.com/k12-lesson-g4-cs-events.html All lessons: https://lessonplans.k12academics.com/