{"id":718,"date":"2026-11-22T21:18:00","date_gmt":"2026-11-22T21:18:00","guid":{"rendered":"https:\/\/ndovu.org.uk\/cs\/?p=718"},"modified":"2026-11-22T21:20:21","modified_gmt":"2026-11-22T21:20:21","slug":"yr-3-term-1-2-3","status":"publish","type":"post","link":"https:\/\/ndovu.org.uk\/cs\/yr-3-term-1-2-3\/","title":{"rendered":"Yr 3 Term 1.2.3 Sensing Objects"},"content":{"rendered":"\n<p><strong>Welcome to Year 3 Computing \u2014 Scratch Lesson 3: Sensing Objects &amp; Variables! \ud83d\udc7b\u2764\ufe0f<\/strong><\/p>\n<p>You have an awesome maze and a moving character! But wait&#8230; your character can walk straight through the walls! Today, we will use <strong>Selection<\/strong> to make our Sprite sense the walls, and <strong>Variables<\/strong> to give our character 3 lives!<\/p>\n\n<div style=\"background-color: #e8f5e9; border-left: 5px solid #4caf50; padding: 15px; border-radius: 5px; margin-bottom: 20px;\">\n  <p style=\"margin: 0; font-size: 14px;\"><strong>Target Standards:<\/strong><\/p>\n  <ul style=\"margin-top: 5px; margin-bottom: 0; font-size: 13px;\">\n    <li><strong>CSTA 1B-AP-09:<\/strong> Create programs that use variables to store and modify data.<\/li>\n    <li><strong>UK National Curriculum:<\/strong> Use selection and variables in programs.<\/li>\n  <\/ul>\n<\/div>\n\n<p><strong>Step 1: Keyboard Warm-up \u2328\ufe0f (10 Mins)<\/strong><\/p>\n<ul>\n  <li>Click here to warm up your fingers: <a href=\"https:\/\/ndovu.org.uk\/type\/\" target=\"_blank\" rel=\"noopener\">Start Typing Practice on Ndovu<\/a>.<\/li>\n  <li>Today&#8217;s keywords: <em>sensing, selection, variable, modify, data, loop.<\/em><\/li>\n<\/ul>\n\n<p><strong>Step 2: Teaching the Sprite to Sense Walls \ud83c\udfac (15 Mins)<\/strong><\/p>\n<p>Watch this video to learn how to lock your sprite to a starting position and use an <strong>If\/Then<\/strong> block to sense the colour of your maze walls. If your sprite touches the wall, it will be sent right back to the start!<\/p>\n\n<!-- Video Embed 1: Sensing -->\n<div style=\"max-width: 800px; margin: 20px auto; border: 2px solid #0073aa; border-radius: 8px; overflow: hidden; background-color: #000;\">\n  <div style=\"position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;\">\n    <iframe src=\"https:\/\/www.youtube.com\/embed\/8Uo_R12BpjQ?rel=0\" style=\"position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0;\" allowfullscreen><\/iframe>\n  <\/div>\n<\/div>\n\n<p><strong>Step 3: Creating a &#8220;Lives&#8221; Variable &amp; Game Over \u2764\ufe0f (15 Mins)<\/strong><\/p>\n<p>Right now, your sprite gets sent back to the start, but nothing else happens. Let&#8217;s make it a real game by adding <strong>Lives<\/strong>! Watch the video below to learn how to create a Variable that counts down, and how to hide your Sprite when lives run out.<\/p>\n\n<!-- Video Embed 2: Lives & Game Over -->\n<div style=\"max-width: 800px; margin: 20px auto; border: 2px solid #e53935; border-radius: 8px; overflow: hidden; background-color: #000;\">\n  <div style=\"position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;\">\n    <iframe src=\"https:\/\/www.youtube.com\/embed\/22mgboR2U9E?rel=0\" style=\"position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0;\" allowfullscreen><\/iframe>\n  <\/div>\n<\/div>\n\n<ul style=\"line-height: 1.6;\">\n  <li>Go to the dark orange <strong>Variables<\/strong> menu and click <em>Make a Variable<\/em>. Type <strong>Lives<\/strong> and click OK.<\/li>\n  <li>Drag the <code>set [Lives] to 3<\/code> block and snap it right under your Green Flag (before the forever loop) so you start with 3 lives.<\/li>\n  <li>Drag the <code>change [Lives] by 1<\/code> block and drop it <strong>inside<\/strong> your <code>if touching color<\/code> block. <strong>Change the 1 to -1<\/strong> so your sprite loses a life!<\/li>\n  <li>To make a <em>Game Over<\/em> screen, use another green flag and a <code>forever<\/code> loop. Add an <code>if &lt; [Lives] &lt; 1 &gt; then<\/code> block from the green <strong>Operators<\/strong> menu. If lives are less than 1, tell the Sprite to <strong>hide<\/strong>! (Don&#8217;t forget to put a <strong>show<\/strong> block under your main start flag so it comes back next game).<\/li>\n<\/ul>\n\n<p><strong>Step 4: Plenary &amp; Reflection \ud83d\udc4b (10 Mins)<\/strong><\/p>\n<p>Let&#8217;s share some of the bugs and struggles we overcame today so we can help each other become better coders. Once we have discussed our work, fill out the reflection tool below to save your certificate!<\/p>\n\n<!-- Reflection Widget -->\n<div id=\"ref-widget\" style=\"max-width: 800px; margin: 20px auto; font-family: Arial, sans-serif; border: 2px solid #ddd; border-radius: 10px; padding: 20px; background-color: #fcfcfc; box-shadow: 0 4px 8px rgba(0,0,0,0.05);\">\n  <h2 style=\"color: #0073aa; margin-top: 0; text-align: center;\">Sensing &amp; Variables Reflection<\/h2>\n  <label style=\"font-weight: bold; display: block; margin-top: 15px;\">Student Name:<\/label>\n  <input type=\"text\" id=\"ref-name\" placeholder=\"e.g., Sarah Jones\" style=\"width: 100%; max-width: 300px; padding: 10px; margin-top: 5px; border: 1px solid #ccc; border-radius: 5px; box-sizing: border-box; font-size: 14px;\">\n  \n  <label style=\"font-weight: bold; display: block; margin-top: 15px;\">1. If the sprite touches the colour of your maze wall, what happens in your code?<\/label>\n  <textarea id=\"ref-q1\" rows=\"2\" placeholder=\"If it touches the wall, it will...\" style=\"width: 100%; padding: 10px; margin-top: 5px; border: 1px solid #ccc; border-radius: 5px; box-sizing: border-box; font-size: 14px;\"><\/textarea>\n\n  <label style=\"font-weight: bold; display: block; margin-top: 15px;\">2. Why do we call &#8216;Lives&#8217; a Variable?<\/label>\n  <textarea id=\"ref-q2\" rows=\"2\" placeholder=\"We call it a variable because the number can...\" style=\"width: 100%; padding: 10px; margin-top: 5px; border: 1px solid #ccc; border-radius: 5px; box-sizing: border-box; font-size: 14px;\"><\/textarea>\n\n  <div style=\"text-align: right; margin-top: 25px;\">\n    <button type=\"button\" id=\"btn-ref-dl\" style=\"background-color: #4CAF50; color: white; border: none; padding: 15px 25px; border-radius: 5px; cursor: pointer; font-size: 16px; font-weight: bold;\">\ud83d\udcbe Download Reflection<\/button>\n  <\/div>\n<\/div>\n\n<script>document.addEventListener(\"click\",function(e){var btn=e.target.closest(\"button\");if(!btn)return;var id=btn.id;function w(t,sx,sy,wl,lh){var ws=t.split(String.fromCharCode(32));var cl=\"\";for(var k=0;k!==ws.length;k++){var tl=cl+ws[k]+String.fromCharCode(32);var m=x.measureText(tl);if(Math.max(m.width,wl)!==wl&&k!==0){x.fillText(cl,sx,sy);cl=ws[k]+String.fromCharCode(32);sy+=lh;}else{cl=tl;}}x.fillText(cl,sx,sy);return sy+lh;}if(id===\"btn-ref-dl\"){var rNm=document.getElementById(\"ref-name\").value.trim();var rQ1=document.getElementById(\"ref-q1\").value.trim();var rQ2=document.getElementById(\"ref-q2\").value.trim();if(rNm===\"\"||rQ1===\"\"||rQ2===\"\"){alert(\"Please fill in your name and both questions!\");return;}var c=document.createElement(\"canvas\");c.width=800;c.height=700;var x=c.getContext(\"2d\");x.fillStyle=\"#ffffff\";x.fillRect(0,0,c.width,c.height);x.strokeStyle=\"#0073aa\";x.lineWidth=15;x.strokeRect(20,20,c.width-40,c.height-40);x.lineWidth=4;x.strokeRect(30,30,c.width-60,c.height-60);var y=100;x.fillStyle=\"#0073aa\";x.font=\"bold 40px Arial\";x.textAlign=\"center\";x.fillText(\"Scratch Variables Reflection\",400,y);y+=70;x.textAlign=\"left\";x.fillStyle=\"#333333\";x.font=\"bold 26px Arial\";x.fillText(\"Student: \"+rNm,50,y);y+=60;x.fillStyle=\"#0073aa\";x.font=\"bold 20px Arial\";x.fillText(\"1. Touching the wall?\",50,y);y+=35;x.fillStyle=\"#555555\";x.font=\"normal 20px Arial\";y=w(rQ1,50,y,700,30);y+=40;x.fillStyle=\"#0073aa\";x.font=\"bold 20px Arial\";x.fillText(\"2. Why is Lives a variable?\",50,y);y+=35;x.fillStyle=\"#555555\";x.font=\"normal 20px Arial\";y=w(rQ2,50,y,700,30);var ln=document.createElement(\"a\");ln.href=c.toDataURL(\"image\/png\");ln.download=\"Y3_Scratch_L3_\"+rNm.split(String.fromCharCode(32)).join(String.fromCharCode(95))+\".png\";document.body.appendChild(ln);ln.click();document.body.removeChild(ln);alert(\"Reflection Downloaded!\");}});<\/script>\n","protected":false},"excerpt":{"rendered":"<p>Welcome to Year 3 Computing \u2014 Scratch Lesson 3: Sensing Objects &amp; Variables! \ud83d\udc7b\u2764\ufe0f You have an awesome maze and a moving character! But wait&#8230;&#8230;<\/p>\n<div class=\"more-link-wrapper\"><a class=\"more-link\" href=\"https:\/\/ndovu.org.uk\/cs\/yr-3-term-1-2-3\/\">Continue Reading<span class=\"screen-reader-text\">Yr 3 Term 1.2.3 Sensing Objects<\/span><\/a><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_kilabel_text_disclosure":"","_kilabel_text_reviewed_by":"","_kilabel_text_reviewed_on":"","_kilabel_text_responsible":"","iawp_total_views":0,"footnotes":""},"categories":[6],"tags":[],"class_list":["post-718","post","type-post","status-publish","format-standard","hentry","category-year3","entry"],"_links":{"self":[{"href":"https:\/\/ndovu.org.uk\/cs\/wp-json\/wp\/v2\/posts\/718","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ndovu.org.uk\/cs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ndovu.org.uk\/cs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ndovu.org.uk\/cs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ndovu.org.uk\/cs\/wp-json\/wp\/v2\/comments?post=718"}],"version-history":[{"count":2,"href":"https:\/\/ndovu.org.uk\/cs\/wp-json\/wp\/v2\/posts\/718\/revisions"}],"predecessor-version":[{"id":721,"href":"https:\/\/ndovu.org.uk\/cs\/wp-json\/wp\/v2\/posts\/718\/revisions\/721"}],"wp:attachment":[{"href":"https:\/\/ndovu.org.uk\/cs\/wp-json\/wp\/v2\/media?parent=718"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ndovu.org.uk\/cs\/wp-json\/wp\/v2\/categories?post=718"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ndovu.org.uk\/cs\/wp-json\/wp\/v2\/tags?post=718"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}