Full Curriculum
Transcription
Full Curriculum
!1 codeSpark Teacher’s Guide Dear Intrepid Teacher, Thank you for your interest in teaching computer science to your kids! Knowledge of computer science and “algorithmic thinking” is increasingly necessary for success in our digital world. This skill is becoming a critical component of 21st century literacy. codeSpark created The Foos as an introduction to the “ABCs of Computer Science.” While it’s important to prepare kids for the modern workplace, computer science is about much more than getting a job in high tech. Research shows that computer science helps students improve in core areas like math, logic, and even reading comprehension. Often people think of programming or coding as computer science but that is just one element. At its core, computer science is the study of how to use logical thinking to identify, simplify and solve complex problems, not 0’s and 1’s. Studies from MIT and Tufts University show that students as young as five can learn complex computer science concepts, especially when artificial barriers like programming syntax are out of the way. codeSpark has created a unique and powerful approach to teaching computer science built on cutting edge research and hundreds of hours of prototype testing. codeSpark’s learning games are designed with no words so even pre-readers and ELL students can play and learn from our powerful curriculum. By playing our games, your students will improve their critical thinking skills, and improve in other disciplines, all while having a lot of fun! -- The codeSpark Team Have questions or feedback? Email us at [email protected] Get our app here – http://thefoos.com !2 Table of Contents Computer Science for K - 5 4 Overview 11 Lesson 1: Sequencing 23 Lesson 2: Flexible Sequences 36 Lesson 3: Commands & Parameters 40 Lesson 4: Events 51 Lesson 5: Loops 63 Lesson 6: Efficiency 73 Lesson 7: Endless Loops 80 Lesson 8: Conditionals Statements I 87 Lesson 9: Conditionals Statements II 91 Lesson 10: Debugging 98 Worksheets 144 Glossary 145 Rubric 146 References 147 Acknowledgements !3 OVERVIEW Computer Science for K - 5 Teacher Overview: Our ten lesson plans provide a fun, flexible and engaging introduction to foundational computer science concepts. They target students in K – 3rd grade, but we’ve successfully tested with students as old as 8th grade. These lesson plans are meant to be highly adaptable. We often suggest variations within the plans themselves. You will be the best judge of what your students need to spend more time on and what they seem to enjoy the most. In addition, most lessons include both an activity with our game, The Foos, and an “unplugged” activity that does not require a computer or other connected device. Materials: Our game, “The Foos" – Code for an Hour. Download it at thefoos.com Available for FREE on iPad, iPhone, Android Devices and web (e.g. major browsers Chrome, Safari, IE, etc.) Props as needed: see each lesson for specifics No experience is necessary, but we recommend you review the lessons and play a few levels of the game prior to teaching it for the first time. Note: This curriculum gives you approximately 10 hours of lessons. If you sign up for our “Foosletter” at thefoos.com, we will notify you when we expand the curriculum and release new versions of the game. !4 OVERVIEW Computer Science for K - 5 What Is Computer Science? Computer Science, or “CS” boils down to solving problems with very specific sets of instructions because computers only do exactly what they are told to do. We think of computers as smart but in reality we need to tell them what to do! They can’t anticipate what we want from them; only computer scientists can come up with precise instructions computers need in order to act. Learning to think like a computer scientist or programmer helps children break down problems, think in logical sequences, and use precise language to give instructions. How To Think Like A Computer Scientist: • computers do only what they are told • everyday processes like getting ready for school or making toast can be thought of as a set of instructions (ex. Get bread, put in toaster, toast… etc) • computer science often begins with a problem to solve • computer scientists have to be very creative in order to: solve problems, entertain, help with everyday tasks, etc • computer scientists mostly work in teams, not alone. Teams are generally better at finding creative solutions to problems than individuals • “Test and learn” strategies for problem solving are generally the best. Making mistakes is always part of the journey to the right answer • computer scientists have to be able to recognize patterns through the noise, a concept known as “abstraction.” The first lesson focuses on identifying common objects that only work when given the proper instructions. Then we will put this idea to work by programming the Police Foo – the first character players meet in our game. !5 OVERVIEW Computer Science for K - 5 Who Are The Foos? The Foos are lovable and cute characters recently discovered by scientists. They are very small and live deep inside every computer, including smartphones, tablets and the computers in your class! Each Foo can walk, jump, throw, eat and navigate their world, called “Fooville.” Some Foos have special abilities that make them unique, for example: • Police Foo - can chase and capture the Glitch • Chef Foo - can make many kinds of food • Ninja Foo - can shrink or grow bigger • Astronaut Foo - can travel in four different directions • Construction Foo - can make crates and also blow them up But, just like computers, the Foos only do what they are told. Students must learn to give them specific commands, or program the Foos, in a specific order. Look out! The blue character with the white horns is the Glitch. He is a force of chaos in Fooville. Sometimes he makes a mess, sometimes he throws things around and sometimes he appears unexpectedly. !6 OVERVIEW Computer Science for K - 5 How Do The Foos Help Me Teach Computer Science? Each Foo is like an animated little computer. Students program them to solve problems, gain new abilities and explore Fooville. As the student progresses through the game, the programs required get more complex. Programming helps solve all kinds of problems in the lives of the Foos, just how the skills learned from programming can help solve problems in real life! “The Foos" combines both structured and open-ended experiences to scaffold learning. In addition to our structured levels that teach students how to play “The Foos,” we have several “Toy Box” areas where students can let their imaginations run free by programing various Foos to interact with each other. As students unlock more Foos and abilities in the structured levels, their options for play in the Toy Box areas expand too. Most importantly, Foos are really, really fun to play with! This means students get deeply engaged with sophisticated concepts and look forward to learning more and testing their knowledge of the game and of programming. Computer Science quickly becomes a favorite subject! What Are Some Common Misconceptions About Computer Science? • Computers are smart! - Computers are actually dumb and require specific instructions to work. They just work very quickly. • Computer Science is only programming - CS is actually multidisciplinary that teaches math, problem solving, and logic. • Computer Science is just for boys - Ada Lovelace is considered to be the first computer programmer. The first all electronic computer was programmed by 6 women. !7 OVERVIEW Computer Science for K - 5 Is The Foos Aligned With State Standards? Yes! The Foos Curriculum is aligned with mathematical state standards, which are listed below. Completing all 10 lessons fulfills all the standards. Standards for Mathematical Practice Lesson Mathematical Practice Make sense of problems and persevere in solving them Reason abstractly and quantitatively Construct viable arguments and critique the reasoning of others Model with mathematics Use appropriate tools strategically Attend to precision Look for and make use of structure Look for and express regularity in repeated reasoning • • • • • • Lesson 1: Sequencing Lesson 4: Events Lesson 10: Debugging • • • • • • • • • • • • • • • • • • Lesson 5: Loops Lesson 7: Endless Loops Lesson 8: Conditional Statements I Lesson 9: Conditional Statements II Lesson 10: Debugging Lesson 6: Efficiency Lesson 5: Loops Lesson 7: Endless Loops Lesson 8: Conditional Statements I Lesson 9: Conditional Statements II Lesson 1: Sequencing Lesson 3: Commands and Parameters Lesson 5: Loops Lesson 7: Endless Loops Lesson 1: Sequencing Lesson 2: Flexible Sequences Lesson 10: Debugging Lesson 5: Loops Lesson 7: Endless Loops Lesson 8: Conditional Statements I Lesson 9: Conditional Statements II !8 OVERVIEW Computer Science for K - 5 Tips and Tricks Here’s the Main Selection screen, click on the puzzle levels. Profile Minigames Puzzle Levels Tutorial Levels Student Section Foo Store Public Levels !9 OVERVIEW Computer Science for K - 5 To unlock all the Levels in that chapter: If you want kids to skip ahead, simply click and hold the last level in that chapter (circled). Reset your progress: To reset your progress go to the profile screen (in the Main Selection) you can make a new profile. If you already have three profiles you can delete one. Make New Profile Delete !10 Lesson 1 Sequencing The Foos Chapter 1 Time: 45-60 Min Materials: Tablets or Computers with The Foos A pencil for each student Story Sequence 1 & 2 handouts Learning Goals: Understand that computers are powerful, but need help to work. - They only do what they are told, in the specific order instructions are received. - Figuring out what instructions to give computers can be tricky. Accustom students to using “test and learn” strategies for problem solving. - “Making mistakes is always part of the journey to the right answer.” Vocabulary: Programming: Creating a sequence of instructions, or an algorithm, that makes a computer do something Algorithm: Instructions to solve a problem or complete a task Sequence: The step-by-step order in which instructions should occur !11 Lesson 1 Sequencing The Foos Chapter 1 Introduction: Begin with a group discussion of the computers that are around us. Some look like laptops, others might be cell phones, projectors, or thermostats. Discuss some “instructions” we give to these computers and what they do. For example, we can tell calculators to add or our cellphones to make phone calls. Introduction (cont.): In computer science, we use the word algorithm to describe the instructions we give computers to solve problems. The specific order of those instructions is called a sequence. Ask students to think about the algorithm to get ready for school in the morning. “What if you put your coat on before your clothes? Your shirt and pants would be on top of your coat, which is just silly!“. When we write algorithms, the order of instructions is really important. Introduce the “Test and Learn” strategy to solving problems, which students can use as they play “The Foos.” !12 Lesson 1 Sequencing The Foos Chapter 1 Step 1 : Understand the problem If not, what did you learn from testing your plan? What is the goal of the puzzle? Step 4: Learn Did you solve the problem? Step 2: Make a plan Test and Learn Step 3: Test the plan What happened when you tested your algorithm? What do you want The Foo to do? Write an algorithm you think would fix the problem !13 Lesson 1 Sequencing The Foos Chapter 1 Game Activities: Let students explore and play the first eight (8) levels (Police Foo). If students have difficulty with the game, reinforce the “Test and Learn” strategy for problem solving. Unplugged Activity: 1. Put students into pairs. 2. Hand out a pencil and Story Sequence 1 handout to each pair. 3. Have each pair work together to identify which picture comes first, second, third, etc. in the story and have them put a number next to each picture to identify the order of events. 4. For an extra challenge, have students try Story Sequence 2. ProTip: Encourage students to use the Test and Learn Strategy (pg. 11) throughout the codeSpark curriculum. This will help develop their problem solving skills and persistence. You can also try out the strategy in other classroom activities as well! Next page is an answer guide for Story Sequences 1 & 2. !14 Lesson 1 Sequencing The Foos Chapter 1 Answer sheet! Activities in back of the book! Story Sequence 1 The Glitch mixed up all these stories! The Foos need your help to put the pictures back in the correct order so the stories make sense. How to Solve: 2 1 Number the boxes in the correct order. Activities Next Page >> !15 Lesson 1 Sequencing The Foos Chapter 1 Answer Key 1 2 3 1 Number the boxes in the correct order 2 1 2 3 !16 Lesson 1 Sequencing The Foos Chapter 1 Answer Key 3 Number the boxes in the correct order 2 4 1 3 1 2 4 3 4 !17 Lesson 1 Sequencing The Foos Chapter 1 Answer sheet! Activities in back of the book! Story Sequence 2 The Glitch mixed up all these stories! Help the Foos put these stories in the right order. But be careful ! Some of the pictures don't belong. How to Solve: 2 Number the boxes in the correct order. x 1 Write an X in the box if it doesn’t belong. Activities Next Page >> !18 Lesson 1 Sequencing The Foos Chapter 1 Answer Key 1 Number the boxes in the correct order and write an X in the box if it doesn’t belong. 3 2 4 X 1 !19 Lesson 1 Sequencing The Foos Chapter 1 Answer Key 2 Number the boxes in the correct order and write an X in the box if it doesn’t belong. 3 2 1 X 5 4 !20 Lesson 1 Sequencing The Foos Chapter 1 Answer Key 3 Number the boxes in the correct order and write an X in the box if it doesn’t belong. 1 X 3 4 2 5 !21 Lesson 1 Sequencing The Foos Chapter 1 Debrief Discussion: • What was the most challenging part of the Story Sequence activities? • Brainstorm other everyday algorithms (e.g., getting ready for bed, the class’ daily • schedule). If time allows, try writing them out on the board to see if the order makes sense. !22 Lesson 2 Flexible Sequences The Foos Chapter 1 & 2 Time: 45-60 Min Materials: Tablets or computers with The Foos Pencils and paper Flexible Sequence 1 & 2 Learning Goals: Understand that actions must happen in a specific order to complete a task. Learn that some sequences are more flexible than others. - For example, making a peanut butter sandwich requires you start and end with a piece of bread but it doesn’t really matter if you put peanut butter or jelly on first Vocabulary: Sequence: The step-by-step order in which instructions should occur. Introduction: Discuss how some sequences are more flexible than others. Ask students if they can think of any flexible sequences in their morning routine. (Perhaps they brush their teeth then eat breakfast or brush their teeth after eating breakfast). !23 Lesson 2 Flexible Sequences The Foos Chapter 1 & 2 More examples: (order they would start to clean their room, order to put on their clothes, order they hug their stuffed animals) Introduction (cont): Some sequences are completely flexible while others require certain beginning and end points (such as getting up and going to school, this sequence will always begin with waking up and it will always end with arriving at school). Reinforce that some sequences are only semi-flexible. Game Activities: Replay levels 5-8 to reinforce programming and sequencing logic. Play Chapter 2: Builder Foo levels 9-12. Ask students if they think the Foos contain flexible sequences? It does! Encourage students to try different sequences to retry or get 3 stars in their already finished levels. !24 Lesson 2 Flexible Sequences The Foos Chapter 1 & 2 Unplugged Activity: 1. Divide students into pairs. 2. Hand out a pencil and Flexible Sandwich Sequence handout to each pair. 3. Have pairs solve the sandwich sequences as they did in Lesson 1, but reiterate that with these, there is not necessarily a “correct” order. 4. Have pairs share their solutions with another pair to see how their sequences differ. 5. For an extra challenge, have pairs try the Flexible Story Sequence Handout. ProTip: Paired Programming - If some of your students finish early, have them help other students who are still working. You can also pair up students at the beginning, where one person “drives” by controlling the mouse, keyboard, or touchscreen and the other person “navigates” by answering the driver’s questions and pointing out potential problems or mistakes. Next page is an answer guide for Flexible Sequences handouts 1 & 2. !25 Lesson 2 Flexible Sequences The Foos Chapter 1 & 2 Answer sheet! Activities in back of the book! Flexible Sequence 1 Help Chef Foo make sandwiches for his friends How to Solve: Number the boxes in the order Chef should combine these ingredients. There are mutiple correct answers! Bread 3 4 1 Bread Ham 2 Mayo Remember that bread is always the first and last part of any sandwhich Activities Next Page >> !26 Lesson 2 Flexible Sequences The Foos Chapter 1 & 2 Answer Key 1 Number the boxes in the order Chef should combine these ingredients. Bread 2 2 3 1 Ham Bread Number the boxes in the order Chef should combine these ingredients. There are many correct answers! 1 Bread Flexible Peanut Butter 4 Bread Flexible Jelly !27 Lesson 2 Flexible Sequences The Foos Chapter 1 & 2 Answer Key 3 Number the boxes in the order Chef should combine these ingredients. There are many correct answers! 1 Flexible Bread Mayo 5 Flexible Bread Ham Flexible Cheese !28 Lesson 2 Flexible Sequences The Foos Chapter 1 & 2 Answer Key 4 Number the boxes in the order Chef should combine these ingredients. There are many correct answers! 1 Flexible Bread Mayo 6 Flexible Ham Bread Flexible Flexible Cheese Turkey !29 Lesson 2 Flexible Sequences The Foos Chapter 1 & 2 Answer sheet! Activities in back of the book! Flexible Sequence 2 The Glitch has struck again and mixed up these sequences! Help the Foos get them back into the right order. How to Solve: Number the boxes in the correct order. (there are mutiple correct answers) 1 Friend Comes to Play 4 Watch TV Some Events must come first Play Catch Friend Goes Home Some Events must come last Activities Next Page >> !30 Lesson 2 Flexible Sequences The Foos Chapter 1 & 2 Answer Key 1 Put the pictures in the correct order. (there are mutiple correct answers) 4 1 Friend Comes to Play Flexible Watch TV Friend Goes Home Flexible Play Catch !31 Lesson 2 Flexible Sequences The Foos Chapter 1 & 2 Answer Key 2 Put the pictures in the correct order. (there are mutiple correct answers) 1 Wake Up Flexible Put on Shoes Flexible Flexible Put on Clothes Put on Jacket 6 Flexible STOP Get on the Bus Eat Breakfast !32 Lesson 2 Flexible Sequences The Foos Chapter 1 & 2 Answer Key 3 Put the pictures in the correct order. (there are mutiple correct answers) 6 Flexible Play Video Games Friend Goes Home 1 Friend Comes to Play Flexible Watch TV Flexible Eat Lunch Flexible Play Catch !33 Lesson 2 Flexible Sequences The Foos Chapter 1 & 2 Answer Key 4 Put the pictures in the correct order. (there are mutiple correct answers) 1 Wake Up Flexible Flexible Put on Shoes Flexible Put on Clothes Put on Jacket Flexible Flexible Brush Teeth Eat Breakfast 8 Flexible STOP Wash Hands Get on the Bus !34 Lesson 2 Flexible Sequences The Foos Chapter 1 & 2 Debrief Discussion • Did any pairs have different story sequences? Were both sequences correct? Why or why not? • If you were building a sandwich robot, what part of sandwich building would be easiest to automate? What would be hardest? Why? !35 Lesson 3 Commands & Parameters The Foos Chapter 2 & 3 Time: 45-60 min Materials: Tablets or computers with “The Foos" 1 set of the Commands & Parameters cards for each student Pencils and paper Learning Goals: Learn what commands are and how they can be modified with parameters. Learn that commands are the primary instruction while parameters are the details – For example “walk” is a command and “left” is a parameter. Vocabulary: Command: primary instructions that tells the computer what action to perform (e.g., run, jump, walk) Parameter: details of instructions that adds more specific information about the command (e.g., direction, color, object to perform an action on) Introduction: Introduce the concepts of commands and parameters by asking the class to tell you the directions to get from your classroom to the library. Tell students to be specific and make sure to include things like the direction (left, right, up, down). !36 Lesson 3 Commands & Parameters The Foos Chapter 2 & 3 Write out the directions on the board and reinforce that the directions are a type of algorithm telling you how to get from the classroom to the library . Circle any commands they give you and underline any parameters. Are there similarities with words that are circled and words that are underlined? Introduction (cont.): Explain that sequences must include commands that tell you what action to do and parameters that add more specific information about how the action should be done. Game Activities: Complete all levels in Chapter 2: Builder Foo Go onto Chapter 3: Ninja Levels (reinforcement levels) After the game ask students to name some of the commands in the Foos. Then have them try to name some of the parameters (reinforce the differences between the two). !37 Lesson 3 Commands & Parameters The Foos Chapter 2 & 3 Unplugged Activity: 1. Divide students into pairs. 2. Pass out 1 set of Commands & Parameters cards to each student. 3. Pass out a pencil and a piece of paper to each group of students. 4. Using these cards, each group tries to create as many programming instructions as possible in 5-10 minutes. - Remind students that a programming instruction must include a command and a parameter. - Combine a command card and a parameter card to create a single instruction. - Record each unique instruction that students create on the paper. 5. After 5-10 minutes, count how many unique instructions each group created. ProTip: Debriefing - Gathering the class as a whole group to debrief the lesson helps students to reflect on their learning. Debrief Discussions are also intended as a time to relate the lesson content to the real-world and make computer science relevant to students’ everyday lives. Next page has Command and Parameter Cards. !38 Lesson 3 Commands & Parameters The Foos Chapter 2 & 3 Commands & Parameters Cards Grey cards are Commands while white cards are Parameters WALK JUMP RIGHT LEFT CHASE THROW UP APPLE PICK UP BUILD BALL GLITCH BLOW UP CHANGE COLOR RED BLUE WALK JUMP RIGHT LEFT CHASE THROW STRAIGHT UP APPLE PICK UP BUILD BALL GLITCH BLOW UP CHANGE COLOR RED BLUE Cards also available in the back of the book. !39 Lesson 4 Events The Foos Chapter 4 Time: 45-60 min Materials: Tablets or computers with “The Foos" Crayons Remote map handout for students Master copy with directions for remote control map activity Learning Goals: Understand that events allow us to have options in algorithms. They are not predetermined but cause things to happen only when the event occurs. Vocabulary: Event: an action or cue that signals a new line of code to run. For example: - When a student raises their hand (the event), you call on them (resulting action of the event). - When the alarm clock goes off (the event), you wake up (resulting action of the event). Introduction: Introduce the concept of events by telling students you are going to ask them a question and you want them to raise their hand if they want you to call on them for the answer. !40 Lesson 4 Events The Foos Chapter 4 Then ask a simple question that most students will be able to answer: What is the color of my hair? What is the weather today? What day of the week is it? Introduction(cont.): Call on a student who has a hand raised and let him/her answer the question. Then ask the class how you knew the student wanted you to call on him/her. The class should mention that the student raised his/her hand. Explain that when the student raised his/her hand, it is an event because it was an action that prompted something else to happen--you calling on the student. Ask the class if they can think of any other types of everyday events. You might need to clarify that you are not talking about events in the conventional sense, like a birthday party or a sports game. In computer science, events are actions that cause something else to happen. Here are some examples: - If you have a call and response to get the student’s attention, your “call” is the event and their response is the resulting action (e.g., you clap three times and the class claps once to let you know they are paying attention; you turn the lights off and the class becomes quiet). - When the alarm clock goes off (the event), you wake up (resulting action of the event). - When the street light turns green (the event), cars start driving (resulting action of the event) - When you click the power button on a computer (the event), the computer turns on (resulting action of the event). !41 Lesson 4 Events The Foos Chapter 4 ProTip: Clarifying Events - If students are confused about events, ask them to think about their favorite game and the ways in which they let the character know what to do. You can also bring up “The Foos" to show them a specific example. Point out that if there were no events in the entire game, it would be really boring to play. Game Activities: Astronaut level 25-29 Ask: Which parts of the code were events? How do you know? !42 Lesson 4 Events The Foos Chapter 4 There are 4 types of events in the Foos: 1. Touch event: When you click on, or touch, the Foo (the event), the code runs (resulting action of the event). 2. Play event: When you click the play button (the event), the code runs (resulting action of the event). !43 Lesson 4 Events The Foos Chapter 4 3. Bump event: When the Foo bumps into something, like the towers in Chapter 4 (the event), the code runs (resulting action of the event). 4. Shout/Hear event: When the Foo hears something, like an order for pasta in Chapter 5 (the event), the code runs (resulting action of the event). !44 Lesson 4 Events The Foos Chapter 4 Unplugged Activity: 1. Hand out a colored crayon and a Map handout to each student. Make sure you have the master copy of the handout with the directions. 2. Tell the class that you aren’t allowed to “say” the location of the treasure but you can tell them through Events. 3. On the board, write out the following directions When I clap my hands, move one block Right. • When I snap my fingers, move one block Left. • When I stomp my feet, move one block Up. • When I turn the lights on and off, move one block Down. • 4. Start the activity by telling students to put their crayon on the center of their maps. Then follow the directions provided in the master copy of the map handout. Make sure to pause in between each line of directions so students have time to move crayons and so they understand when two lines of consecutive directions have the same action (e.g., when you want students to move left two squares, you stomp your feet and then stomp your feet again). 5. When you finish going through each activity, all students should end at the same point on the map. Answer sheet and the shape the students draw should match. 6. Play again with Map 2 and 3. 7. Feel free to add in your own directions to make the game more challenging. Next page is an answer guide for Events handout. !45 Lesson 4 Events The Foos Chapter 4 The secret map Answer sheet! Activities in back of the book! Your teacher is sending you location of a teasure on this map. The location is secret so they can’t tell you except through events! How to decode: Hand Clap Event… Go Right one space on the chart. Snap Fingers Event… Go Left one space on the chart. Stomp Feet Event… Go Up one space on the chart. Turn Light On And Off… Go Down one space on the chart. !46 Lesson 4 Events The Foos Chapter 4 Answer Key 1 Directions: Turn lights on and off, Snap, Stomp, Snap, Turn lights on and off !47 Lesson 4 Events The Foos Chapter 4 Answer Key 2 Directions: Turn lights on and off, Clap, Clap, Stomp, Stomp, Stomp, Snap !48 Lesson 4 Events The Foos Chapter 4 Answer Key 3 Directions: Stomp, Snap, Stomp, Snap, Turn lights on and off, Snap, Turn lights on and off, Clap, Turn lights on and off, Clap, Turn lights on and off, Clap, Stomp !49 Lesson 4 Events The Foos Chapter 4 Debrief Discussion: • What were the events in the map activity? What were the resulting actions? • What were the events in the Foos? • Why do you think events are important for computer programs (hint: provide options for users so not everything is completely predetermined)? • What are some other everyday events? !50 Lesson 5 Loops The Foos Chapter 2 & 3 Time: 45-60 min Materials Tablets or computers with “The Foos" Pencils Loops 1 & 2 Handouts Learning Objectives: Understand why a loop is powerful Understand that some sequences are more efficient, and thus more desirable, than others. Efficiency is important because computers don't have unlimited processing power. Recognize everyday routines that might benefit from a loop command. Recognize the use of loops in favorite video games. Vocabulary: Loop: A set of instructions that is repeated over and over again. Introduction: Introduce the concept of loops by brainstorming examples of everyday activities that include repeated actions, or loops. Explain that loops help make code more efficient since computers only have so much power. Write the name of an activity and the steps or loops to complete it. !51 Lesson 5 Loops The Foos Chapter 2 & 3 Introduction (cont.): Examples: - Washing Hands: Wet hands — Soap hands — LOOP: (Rub hands, 3 times) – Rinse hands - Brushing teeth: Squeeze paste — wet brush — LOOP: (brush teeth, 10 times) — spit — Rinse — brush - Spreading butter: get butter -- LOOP: (spread, 3 times) Game Activities: Have the students play Chapter 2 episode 10 when the loops gets introduced. Have students replay the rest of the Chapter 2 levels. Can they use a loop on every level? Loop Does this generally make their programs smaller (e.g. do they use fewer total commands to solve the puzzle)? !52 Lesson 5 Loops The Foos Chapter 2 & 3 Have students explore Chapter 3, Levels 17-20 again if time allows. Can they use multiple loops within a level? Does understanding loops make challenges easier? Unplugged Activity: 1. Divide students up into pairs. 2. Hand out a pencil and Loops Handout 1 to each pair. 3. Have students work together to complete the handout. 4. For an extra challenge, have students try Loops Handout 2! Next page is an answer guide for Loop handouts 1 & 2. !53 Lesson 5 Loops The Foos Chapter 2 & 3 Looping Activity 1 Answer sheet! Activities in back of the book! It’s almost Snack Time and Police Foo is hungry. Help her navigate to her snack. How to Solve: Give Police Foo the right loop command to reach the Donut square. 3 Fill in the blank to solve Activities Next Page >> !54 Lesson 5 Loops The Foos Chapter 2 & 3 Answer Key 1 Help Police Foo reach the Donut Square! 4 Help Police Foo reach the Donut Square! 2 4 !55 Lesson 5 Loops The Foos Chapter 2 & 3 Answer Key 3 Help Police Foo reach the Donut Square! 5 Help Police Foo reach the Donut Square! 4 4 Oh no! The arrow is missing ! write the correct arrow in the blank !56 Lesson 5 Loops The Foos Chapter 2 & 3 Looping Activity 2 Answer sheet! Activities in back of the book! Astronaut Foo has lost her puppy in space. Help her navigate to her puppy. How to Solve: Give Astronaut Foo the right loop commands to reach the puppy square. Remember the second loop will only run after the first loop has finished. 3 2 Fill in the blank to solve Activities Next Page >> !57 Lesson 5 Loops The Foos Chapter 2 & 3 Answer Key 1 Help Astronaut Foo reach the Puppy Square! Fill in the blank 2 2 Help Astronaut Foo reach the Puppy Square! 2 2 !58 Lesson 5 Loops The Foos Chapter 2 & 3 Answer Key 3 Help Astronaut Foo reach the Puppy Square! 4 3 !59 Lesson 5 Loops The Foos Chapter 2 & 3 Answer Key 4 Help Astronaut Foo reach the Puppy Square! 4 Fill in the blank 3 Fill in the blank !60 Lesson 5 Loops The Foos Chapter 2 & 3 Answer Key 5 Help Astronaut Foo reach the Puppy Square! 3 Oh no, the arrow is gone. Fill in this blank too ! 2 Fill in the blank !61 Lesson 5 Loops The Foos Chapter 2 & 3 Debrief Discusion: • What are the benefits of using loops? • What are some classroom activities that we could write as an action sequence with loops? (If time allows, write the sequences on the board). • Can there be more than one loop within a sequence? • What are some favorite games that seem to have loops? - Examples: Temple Run, Subway Surfer, or Minion Rush are all “Endless Runner” games where the player controlled character is always moving forward. This is a classic example of using a loop for efficiency. The player only has to think about up/down and right/left. Forward is taken care of by the loop. ProTip: Real Life Loops - To help students better understand loops, have them play these games and see if they can identify where the loops are: “Temple Run,” “Subway Surfer,” and “Minion Rush.” !62 Lesson 6 Efficiency The Foos Chapter 3 & 4 Time: 45-60 min Materials: Tablets or computers with “The Foos" 4 different colored crayons Foos Patch Quilt Handout Learning Goals: Practice making programs more efficient. Understand the concept of efficiency and that the best programs are the most efficient Efficient programs use the fewest commands Vocabulary: Efficient programs: Programs that respond more quickly and take less memory and power Introduction: On the board, draw an A on one side and a B on the other. Then draw a straight line from point A to point B and in a different color, draw a curved line with ups and downs but still goes from point A to point B. Tell students that your car is running out of gas and you need get from Point A to the gas station before you run out. Which line should you take (answer: straight line)? Ask students why taking the straight line would be better. !63 Lesson 6 Efficiency The Foos Chapter 3 & 4 Point out that the straight line is the shorter route and would take up less gas so you would be less likely to run out of gas before you got to the gas station. Introduce the concept of efficiency and note that in the driving example, straight line was more efficient because it got you from point A to point B the quickest. Explain how in computer science, we also want to be efficient when we write code. The most efficient code is always desirable because computers don't have unlimited processing power just like we don’t have unlimited amounts of gas to drive from point A to B. The “best solution” generally involves the fewest commands, but sometimes it’s quite challenging to write a short program and creativity is required to solve the problem. Game Activities: Have students replay The Foos Chapter 3 & 4. Are there multiple ways to get through the levels? Which are some of the most efficient? What commands made your students’ more efficient? Does the number of stars you receive mean your code was more efficient? !64 Lesson 6 Efficiency The Foos Chapter 3 & 4 Unplugged Activity: Pass out crayons and the Foo Patch Quilt handout. Students should have access to a variety of crayon colors. There are two rules for coloring the blanket: • Each color will cost the Foos more money because they’ll need to buy more fabric, so using more colors would not be efficient. Students need to use the fewest colors they can to finish the quilt. • The Foos don’t want any patches that touch to be the same color. ProTip: The Four Color Theorem - Did you know that you only need four different colors to color a map with no adjacent regions having the same color? This is called the Four Color Theorem and is the basis behind the Foos Patch Quilt activity. Have your students test out the theorem with larger maps. Next page is an answer guide for Foo Quilt Making. !65 Lesson 6 Efficiency The Foos Chapter 3 & 4 Foo Quilt making Answer sheet! Activities in back of the book! Help the Foos make a Quilt! Color in the patches with the color that the fabric should be. But watch out! Fabric can be expensive. Rule 1 - Use the fewest color crayons possible. Rule 2 - One patch can not be the same color as one next to it. Color in the patches. Try to use the least amout of crayons. One patch can not be the same color as the square next to it. Activities Next Page >> !66 Lesson 6 Efficiency The Foos Chapter 3 & 4 Answer Key 1 Color in the Quilt Use the fewest color crayons possible. One patch can not be the same color as one next to it. Color 1 Color 2 Color 1 Color 2 Color 1 Color 2 Color 1 Color 2 Color 1 !67 Lesson 6 Efficiency The Foos Chapter 3 & 4 Answer Key 2 Color in the Quilt Use the fewest color crayons possible. One patch can not be the same color as one next to it. Color 1 Color 1 Color 2 Color 2 Color 2 Color 2 Color 1 Color 1 Color 1 Color 2 Color 1 Color 1 Color 2 Color 2 Color 1 Color 2 Color 1 !68 Lesson 6 Efficiency The Foos Chapter 3 & 4 Answer Key 3 Color in the Quilt Use the fewest color crayons possible. One patch can not be the same color as one next to it. (This is just one of many possible solutions) Color 1 Color 3 Color 2 Color 1 Color 3 Color 2 Color 1 Color 2 Color 3 Color 1 Color 2 Color 3 Color 1 !69 Lesson 6 Efficiency The Foos Chapter 3 & 4 Answer Key 4 Color in the Quilt Use the fewest color crayons possible. One patch can not be the same color as one next to it. Color 1 Color 1 Color 2 Color 2 Color 1 Color 2 Color 1 Color 2 Color 1 Color 2 Color 1 Color 2 Color 2 Color 2 Color 1 Color 1 Color 2 Color 1 Color 2 Color 1 Color 2 Color 2 Color 1 Color 1 !70 Lesson 6 Efficiency The Foos Chapter 3 & 4 Answer Key 5 Color in the Quilt Use the fewest color crayons possible. One patch can not be the same color as one next to it. Color 2 Color 3 Color 1 Color 2 Color 1 Color 3 Color 2 Color 1 !71 Lesson 6 Efficiency The Foos Chapter 3 & 4 Debrief Discussion: • When playing “The Foos”, what sequences were most efficient? Why? What commands helped make the sequences efficient (e.g., loops)? • How many colors did you use to color the quilt? Did anyone use fewer colors? • Can you think of other everyday activities where we want to be efficient? - Turning off the water when brushing teeth is efficient because it helps save water. - Taking the shortest route to school is efficient because you get to school faster and save time and gas! !72 Lesson 7 Endless Loops The Foos Chapter 4 Time: 45-60min Materials: Tablets or computers with “The Foos” Command and Parameter Dance Cards Rules for Whoosh ball Learning Goals: Understand the difference between a loop and an endless or infinite loop Understand how an event can interrupt an endless loop, but once this event is over, the loop continues Vocabulary: Endless loop: A set of instructions that is repeated over and over again without end. Event: an action or cue that signals a new line of code to run. Introduction: Review the topic of basic loops and why loops are beneficial (hint: they make code more efficient). Introduce the concept of endless loops and provide some examples: the earth rotating around the sun, time, electricity. !73 Lesson 7 Endless Loops The Foos Chapter 4 When writing code we can include events that interrupt an endless loop and cause something else to happen. But once the event is over, the endless loop continues. Introduction (cont.): Example: - Electricity is an endless loop, but when you flip the light switch, it temporarily shuts off until the light switch is turned on again. - Teach students “This is the song that never ends” as an example of an endless loop. “This is the song that never ends. It goes on and on my friends. Someone started singing it not knowing what it was, and they'll continue singing it forever just because.” (Repeat over and over) Game Activities: Have students play “The Foos," Chapter 4, Level 27 with the Astronaut Foo. !74 Lesson 7 Endless Loops The Foos Chapter 4 What are the benefits of the endless loop in this level? Set to infinite The infinity sign at the bottom of the command has the Astronaut moving endlessly to the right. Ask students to come up with a solution for the level that does not require an infinite loop. After they’ve completed the level ask them if they think using the infinite loop was better? Now students are ready to play levels 28 through 34. !75 Lesson 7 Endless Loops The Foos Chapter 4 Unplugged Activity 1: 1. Divide students into pairs and provide each pair with Command and Parameters Dance Cards (see examples on the next page). 2. In pairs, have students use the cards to create their own dances. There are two rules for dance: - The dance must be contained within a endless loop. - It must include at least one command and one parameter. 3. Have pairs write down the sequence of actions and the parameters that make up their dance. 4. Have each pair present their dance to the whole class (act it out!) and ask the other students to identify what were the commands and parameters of the dance loop. ProTip: Debugging - Often in computer science, we encounter mistakes that make our programs do things incorrectly. When creating their dance, students might have made mistakes in their code. Remind students that making mistakes is part of the process, and we can learn from every mistake. !76 Lesson 7 Endless Loops The Foos Chapter 4 Endless Loop Dance Activity Commands & Parameters Cards Grey cards are Commands while white cards are Parameters CLAP TURN AROUND ONCE TWICE SNAP FINGERS WAVE HAND THREE TIMES RIGHT JUMP SHAKE HIPS LEFT UP HOP WIGGLE DOWN FAST WADDLE TAP FOOT SLOW FOUR TIMES Cards available in the back of the book with other activities. !77 Lesson 7 Endless Loops The Foos Chapter 4 Debrief: • How could you tell the dance was looping? Which commands stood out most? • What are some real-life situations where endless loops would be more beneficial than regular loops? What are situations where regular loops might be better? - Examples: treadmills, escalators, turn signals, water cycle Unplugged Activity 2: 1. Have students stand in a circle and tell them you have a ball of energy (it’s imaginary), and the only way to move the ball around the circle is with the sound “whoosh”. 2. To start the game, send the whoosh ball to the student on your right, exemplifying how students should say “whoosh” as they send the whoosh ball around. Have students continue sending the whoosh ball around the circle until it comes back to you. 3. Introduce two new events. One is “Boink,” which reverses the direction of the ball, and the other is “Zap,” which sends the ball across the circle. For Boink, tell students to put their hands up in the “stop” position and say “Boink” to reverse the direction of the whoosh ball. For Zap, tell students to make eye contact with someone across the circle and point to that person while saying “Zap” to send the whoosh ball across the circle. Then play with all three commands. 4. After playing for several minutes, have the whole group discuss and draw out the code for Whoosh Ball. !78 Lesson 7 Endless Loops The Foos Chapter 4 Debrief: • Have students talk about the code for Whoosh ball. Do they think that loops can be interrupted by events sometimes? • Which event interrupts the endless loop in the Astronaut Levels? (hint: Bump event) !79 Lesson 8 conditional Statements I The Foos Chapter 5 Time: 45-60 min Materials: Tablets or computers with “The Foos" Dice Dice Game Instructions Bingo Cards Pencils Learning Goals: Understand that a programmer can cause actions to only occur under certain conditions. • “IF” blocks describe actions that occur only IF a certain condition is met. For example, IF it is raining, you use an umbrella. Demonstrate how IF statements are used in everyday life. Demonstrate how IF statements can be used to make programs more dynamic and efficient. Understand a specific instance of the IF condition is broadcasting messages with selective responses. - For example: IF I call your name, you line up at the door. Here, the message is calling the student’s name and the selective response is the one student who is named lines up at the door. !80 Lesson 8 conditional Statements I The Foos Chapter 5 Vocabulary: Conditional statements/actions: statements/actions that only occur under certain conditions. “IF” block: statements/actions that occur only IF the specified condition is met. Broadcast messaging and selective response: A special case where an IF statement is broadcast but only those things meeting the condition respond. Introduction: Introduce the concept of conditional statements and the IF block by letting the class know that if they are completely quiet for 10 seconds, you will do something like: - Put on music and have a dance break - Play a fun game - Do 10 jumping jacks Start counting right away. If the students succeed, give them the reward. Otherwise, let them know why they did not get the reward. Then ask the class, “What was the condition of the reward?” - The condition was if they were quiet for 10 seconds. - If they were, the condition would be true and they get the reward. - If they were not, the condition would be false so they do not get the reward. Ask the students if they can think of other conditional statements from their everyday life. Here are some examples: - If it is cold, you wear a coat. - If you are tired, you go to sleep. Introduce the special IF condition of broadcast messaging and selective response. Let the students know they will have to listen carefully to your instructions in order to !81 Lesson 8 conditional Statements I The Foos Chapter 5 go back to their desks/tables to start playing “The Foos.” Then use broadcasting messaging IF statements to call students back to their tables. Keep broadcasting IF statements until all students have been selected to return to their desks to start the game activities. Here are some examples: - IF you are wearing red, you can return to your desk. - IF you have a brother, you can return to your desk. - IF your birthday is in October, you can return to your desk. Game Activities: Have students play Chapter 5, Levels 35-44, with the Chef Foo. “IF” block Can they identify the IF blocks? In the previous chapter, the Astronaut had the bump event. In this chapter the chef has a new event (broadcast message). When does it run code (selective response)? Were the IF conditions necessary? !82 Lesson 8 conditional Statements I The Foos Chapter 5 Unplugged Activity 1: 1. Have students team up in groups of (3-4) and pass out dice and Dice Game instructions to each group (or write out instructions on a white board/ blackboard). 2. Have students play the game several times, or as time allows. Dice Game on next page. !83 Lesson 8 conditional Statements I The Foos Chapter 5 Iffy Dice Game You will be competing for Dice Victory! The Rules: Make a Group. The oldest player must keep score on a blank piece of paper. The youngest player rolls first. The player to the right of youngest rolls next. Continue taking turns rolling and passing the dice to the right. IF you roll… you add 1 point to your score. IF you roll… you steal a point from your neighbor to the right. IF you roll… you subtract 1 point from your score. IF you roll… you have to do 10 jumping jacks. IF you roll… give a point to your neighbor on the left. IF you roll… you lose a turn. IF you… have 5 points you’re the winner! !84 Lesson 8 conditional Statements I The Foos Chapter 5 Debrief Discussion: Could you write the code for the Dice Game? Make a list of every day “IF” conditions that you use in the classroom. - “If” you do your homework, you get a star - “If” it is Monday, we go to gym class - “If” it is raining, we have indoor recess. ProTip: More Dice Games - If students really enjoy the Iffy Dice Game, have them create their own set of IF statement rules and play the game again. You can also play this game with a deck of cards by assigning IF statement rules to each color, suit, and/or number value. Unplugged Activity 2 - Bingo: 1. Pass out Bingo cards to each student. 2. Explain the Rules: - Pick your favorite numbers between 1-100 and fill the empty boxes on the Bingo board. - IF one of your numbers is the same as a number called an X over its box. - IF you have a complete row, raise your hand and say Bingo! 3. Play several rounds of Bingo as time allows (tip: write called numbers on the board). !85 Lesson 8 conditional Statements I The Foos Chapter 5 Blank Bingo boards available in the back of the book. Debrief: What were the IF conditions in Bingo? Can you think of other games or activities that have IF conditions? !86 Lesson 9 conditional Statements II The Foos Chapter 5 Time: 45-60 min Materials: Tablets or computers with “The Foos" Dice Learning Goals: Understand that the IF statement can be extended to explain what should happen if the condition is not met using the IF/ELSE command. ELSE statements describe what action occurs when the IF statement is false. For example, IF I call your name, you line up at the door. Or ELSE, you sit on the carpet. Understand that IF statements can be extended to have multiple IF conditions using the ELSE/IF command. Practice how IF, IF/ELSE, and ELSE/IF statements can be used to make programs more dynamic and efficient. Practice using IF, IF/ELSE, and ELSE/IF statements embedded in loops to make programs more dynamic and efficient. Vocabulary: IF block- statements/actions that occur only IF the specified condition is met. Else statement - When an IF action isn't met the ELSE action will execute. !87 Lesson 9 conditional Statements II The Foos Chapter 5 Introduction: Review the concept of IF conditional statements from the previous lesson by providing a couple of examples: - If it is sunny, you wear sunglasses. - If it is Monday, you go to art class. What happens if the “If” condition is false? If it is NOT Monday, then what? Explain that sometimes we want an extra condition in case the “IF” statement is not true. We use the “ELSE” statement instead. Using a die, show an example of an IF/ELSE statement by telling the class, “IF I roll a three, then everybody claps. Or else, everybody snaps their fingers.” Roll the dice and show it to the class to see if they react properly. What was the IF condition? What was the ELSE condition? Which condition was met? Explain to the class that there could also be more than one condition. For example, “What if I wanted you to clap IF I roll a 3, or ELSE IF I roll something less than a 3, everyone says “Yay!” or ELSE you snap your fingers. So now we have the commands IF, ELSE IF, and ELSE.” Clarify the IF, ELSE IF, ELSE statements: -IF is the first condition (roll a 3) -ELSE IF gets looked at only if the IF condition is not true (roll something less than 3) -ELSE gets looked at only if nothing before it is true (roll something not 3 or less than 3) !88 Lesson 9 conditional Statements II The Foos Chapter 5 Flow Chart of an IF/ELSE Statement: IF I roll a 3, clap. ELSE IF I roll less than 3, say “Yay!” ELSE snap fingers. yes clap no ELSE IF (roll <3) IF (roll 3) yes say “Yay!” no ELSE (roll not 3 or <3) snap fingers Unplugged Activity (Red Light/Green Light): 1. This is a version of Red light/Green light with different commands. Have students stand on one side of the room while you stand on the other. 2. Tell the class that you are going to call out different conditional statements and IF they meet the condition, then they get to take a step forward. The student who makes it to the other side of the room first wins. 3. Call out different conditional statements for the students to respond to. You can start off with basic IF conditions and progress to IF/ELSE conditions. Here are some examples of conditional statements to call out during the game: - IF you are wearing purple, take one step forward. - IF you are NOT wearing sneakers, take a step forward. - IF you have a sister, take one step backward. ELSE take one step forward. - IF you play soccer, take one step forward. ELSE IF you play basketball, take one step backwards. ELSE don’t move. !89 Lesson 9 conditional Statements II The Foos Chapter 5 Debrief Discussion (Red Light/Green Light): Choose one of the IF/ELSE statements from the game and as a class, write out the code for it. For example: - IF you have a sister, take one step backward. ELSE take one step forward. Can you think of other games that have IF and IF/ELSE conditions? Pro Tip: Lining up with IF Statements - The next time your class is lining up to leave the room, use conditional IF statements to call students to line up. Keep using IF statements until all students are lined up. !90 Lesson 10 Debugging Foo Studio Materials: Tablets or computers with “The Foos” Pencils Debugging A and B Handouts Learning Goals: Practice creative problem solving skills, including novel ways to solve a problem and fix algorithms that may be unclear or missing steps. Recognize that mistakes happen all the time in coding and practice trial and error as a technique to find solutions. Vocabulary: Bugs: Mistakes or problems in algorithms that cause the computer program to do something we don’t want it to do. Debugging: Finding and fixing problems in algorithms or computer programs. Persistence: Continuing to try to do something even when it’s hard. Introduction: Introduce the concept of debugging and how sometimes things go wrong with computers and we need to fix them by adjusting the instructions we give them. Introduce the concept of persistence. Discuss how many times we initially make some mistakes when trying something new but mistakes offer opportunities to learn. Examples include: learning to walk, ride a bike, read, and tie shoes. !91 Lesson 10 Debugging The same applies for computer science. Coding can be really challenging and even some of the best coders make mistakes, but they persist until they find the best solution. Game Activities: Foo Studio is a new addition to The Foos where players can build their own video game levels, share those levels with friends and play levels their peers make. Players can apply the coding principles they learned in the puzzle levels to reprogram any object in Foo Studio. Players earn coins in the puzzle levels that can be used to purchase Foo Store items. All purchased items can be used in Foo Studio levels. This is the tutorial page: !92 Lesson 10 Debugging This is the player page: Create a new level Unpublished levels Player’s published levels (visible to all) This is the “create your own level” section: change level name play level “Draw” (opens item inventory) “Erase” (erases placed items) !93 Lesson 10 Debugging Foo Studio Delete Resize Copy Rotate Programming block section This is the Published Levels section. All levels the players publish can be seen by everyone, and players can play levels published by other players: Featured Levels Trending Levels Highest Rated Levels !94 Lesson 10 Debugging Foo Studio Did students make any mistakes in their code that they had to revise? How did they figure out what was wrong and how to fix it? Unplugged Activity 1: 1. Divide students into pairs. 2. Give each pair the name of a simple object. Tell pairs not to share their object with other pairs. 3. Examples of objects: dog, person, tree, flower, cupcake, apple, etc. 4. Have each pair write the algorithm to draw their object, but have students include 3 “bugs,” or mistakes in their algorithms. 5. Once all pairs have finished their algorithms, have them switch with another pair and try to draw the object according to the algorithm. Remind students that they will need to find the bugs and fix the code to draw the object correctly. Debrief Discussion (Draw and Debug): Did the drawings come out as expected? If not, what strategies did they use to find and fix the bugs? What did they have to add or take out to make the algorithms clearer? Were there any unintentional bugs that needed to be fixed to make the algorithm result in the correct drawing? If time allows, have pairs revise and retest their new algorithms. ProTip: Persistence - Developing persistence in problem solving is an important 21st Century Skill for all students to learn. You can encourage persistence by: !95 Lesson 10 Debugging - Asking students thoughtful questions that help them problem solve on their own. - Pointing out actions that helped students accomplish their goals so they recognize how persistence is connected with their goals. - Modeling persistence in your teaching. Unplugged Activity 2: 1. Divide students into pairs. 2. Give each pair a “How to” activity for which they will have to write the algorithm. Tell students not to share their activities with other pairs. Here are some examples: - How to bake a cake - How to build a paper airplane - How to get to the playground - How to write their name - How to make a sandwich - How to tie your shoes 3. Have each pair write out the list of steps, or algorithm, to complete their “How to” activity. 4. Once all pairs are finished, gather the class back together and have each pair share the steps of their “How to” activity WITHOUT letting the rest of the class know what the activity is they are trying to teach. 5. Have the rest of the class try to guess what the activity is. If the class has trouble, ask the pair what they might need to do to revise, or debug, their algorithm to make the activity clearer. !96 Lesson 10 Debugging Debrief Discussion (Design and Debug): Could the class figure out the activity? Did they need clarification or modifications to the steps provided? Are there different ways you could write out the steps to the same activity? Does the order matter or could things be switched around (e.g., if the activity was baking a cake, does it matter if you put the eggs in first or the butter?) !97 WorkSheets by Section !98 Sequencing !99 Story Sequence 1 The Glitch mixed up all these stories! The Foos need your help to put the pictures back in the correct order so the stories make sense. How to Solve: 2 1 Number the boxes in the correct order. Activities Next Page >> !100 1 Number the boxes in the correct order. 2 !101 3 Number the boxes in the correct order. 4 !102 Story Sequence 2 The Glitch mixed up all these stories! Help the Foos put these stories in the right order. But be careful ! Some of the pictures don't belong. How to Solve: 2 Number the boxes in the order that the story goes. x 1 Write an X in the box if it doesn’t belong. Activities Next Page >> !103 1 Number the boxes in the correct order and write an X in the box if it doesn’t belong. !104 2 Number the boxes in the correct order and write an X in the box if it doesn’t belong. !105 3 Number the boxes in the correct order and write an X in the box if it doesn’t belong. !106 Flexible Sequences !107 Flexible Sequence 1 Help Chef Foo make sandwiches for his friends How to Solve: Number the boxes in the order Chef should combine these ingredients. There are mutiple correct answers! Bread 3 4 1 Bread Ham 2 Mayo Remember that bread is always the first and last part of any sandwhich Activities Next Page >> !108 1 Number the boxes in the order Chef should combine these ingredients. 3 1 Bread 2 Ham Bread Number the boxes in the order Chef should combine these ingredients. There are many correct answers! Bread Peanut Butter Bread Jelly !109 3 Number the boxes in the order Chef should combine these ingredients. There are many correct answers! Bread Mayo Ham Bread Cheese !110 4 Number the boxes in the order Chef should combine these ingredients. There are many correct answers! Bread Mayo Ham Bread Cheese Turkey !111 Flexible Sequence 2 The Glitch has struck again and mixed up these sequences! Help the Foos get them back into the right order. How to Solve: Number the boxes in the correct order. (there are mutiple correct answers) 1 Friend Comes to Play 4 Watch TV Some Events must come first Play Catch Friend Goes Home Some Events must come last Activities Next Page >> !112 1 Put the pictures in the correct order. (there are mutiple correct answers) Friend Comes to Play Watch TV Friend Goes Home Play Catch !113 2 Put the pictures in the correct order. (there are mutiple correct answers) Wake Up Put on Shoes Put on Clothes Put on Jacket STOP Get on the Bus Eat Breakfast !114 3 Put the pictures in the correct order. (there are mutiple correct answers) Play Video Games Friend Comes to Play Watch TV Friend Goes Home Eat Lunch Play Catch !115 4 Put the pictures in the correct order. (there are mutiple correct answers) Wake Up Put on Shoes Put on Clothes Put on Jacket Brush Teeth Eat Breakfast STOP Wash Hands Get on the Bus !116 Commands & Parameters !117 WALK JUMP RIGHT LEFT CHASE TRHOW UP APPLE PICK UP BUILD BALL GLITCH BLOW UP CHANGE COLOR RED BLUE WALK JUMP RIGHT LEFT CHASE THROW STRAIGHT UP APPLE PICK UP BUILD BALL GLITCH BLOW UP CHANGE COLOR RED BLUE !118 Events !119 The secret map Your teacher is sending you location of a teasure on this map. The location is secret so they can’t tell you except through events! How to decode: Hand Clap Event… Go Right one space on the chart. Snap Fingers Event… Go Left one space on the chart. Stomp Feet Event… Go Up one space on the chart. Turn Lights On And Off Event… Go Down one space on the chart. !120 1 !121 2 !122 3 !123 Loops !124 Looping Activity 1 It’s almost Snack Time and Police Foo is hungry. Help her navigate to her snack. How to Solve: Give Police Foo the right loop command to reach the Donut square. 3 Fill in the blank to solve Activities Next Page >> !125 1 Help Police Foo reach the Donut Square! Help Police Foo reach the Donut Square! 2 !126 3 Help Police Foo reach the Donut Square! Help Police Foo reach the Donut Square! 4 Oh no! The arrow is missing ! write the correct arrow in the blank !127 Looping Activity 2 Astronaut Foo has lost her puppy in space. Help her navigate to her puppy. How to Solve: Give Astronaut Foo the right loop commands to reach the puppy square. Remember the second loop will only run after the first loop has finished. 3 2 Fill in the blank to solve Activities Next Page >> !128 1 Help Astronaut Foo reach the Puppy Square! Fill in the blank 2 Help Astronaut Foo reach the Puppy Square! 2 !129 3 Help Astronaut Foo reach the Puppy Square! 4 !130 4 Help Astronaut Foo reach the Puppy Square! Fill in the blank Fill in the blank !131 5 Help Astronaut Foo reach the Puppy Square! 3 Oh no, the arrow is gone. Fill in this blank too ! 2 Fill in the blank !132 Efficiency !133 Foo Quilt making Help the Foos make a Quilt! Color in the patches with the color that the fabric should be. But watch out! Fabric can be expensive. Rule 1 - Use the fewest color crayons possible. Rule 2 - One patch can not be the same color as one next to it. How to Solve: Color in the patches. Try to use the least amout of crayons. One patch can not be the same color as the square next to it. Activities Next Page >> !134 1 Color in the Quilt Use the fewest color crayons possible. One patch can not be the same color as one next to it. !135 2 Color in the Quilt Use the fewest color crayons possible. One patch can not be the same color as one next to it. !136 3 Color in the Quilt Use the fewest color crayons possible. One patch can not be the same color as one next to it. !137 4 Color in the Quilt Use the fewest color crayons possible. One patch can not be the same color as one next to it. !138 5 Color in the Quilt Use the fewest color crayons possible. One patch can not be the same color as one next to it. !139 Endless Loops !140 CLAP TURN AROUND ONCE TWICE SNAP FINGERS WAVE HAND THREE TIMES RIGHT JUMP SHAKE HIPS LEFT UP HOP WIGGLE DOWN FAST WADDLE TAP FOOT SLOW FOUR TIMES !141 Conditional Statements I !142 !143 GLOSSARY Algorithm: Instructions to solve a problem or complete a task. (p. 11) Broadcast messaging and selective response: A special case where an IF statement is broadcast but only those things meeting the condition respond. (p. 81) Bugs: Mistakes or problems in algorithms that cause the computer program to do something we don’t want it to do. (p. 91) Command: Primary instructions that tells the computer what action to perform (e.g., run, jump, walk). (p. 36) Computer Science: Solving problems with very specific sets of instructions because computers only do exactly what they are told to do. (p. 5) Conditional statements/actions: statements/actions that only occur under certain conditions. (p. 81) Debugging: Finding and fixing problems in algorithms or computer programs. (p. 91) Efficient programs: Programs that respond more quickly and take less memory and power. (p. 63) ELSE statement: When an IF statement isn't met the ELSE actions will execute. (p. 87) Endless Loop: A set of instructions that is repeated over and over again without end. (p. 73) Event: An action or cue that signals a new line of code to run. (p. 40, 73) IF block: Statements/actions that occur only IF the specified condition is met. (p. 81, 87) Loop: A set of instructions that is repeated over and over again. (p. 51) Parameter: Details of instructions that adds more specific information about the command (e.g., direction, color, object to perform an action on). (p. 36) Persistence: Continuing to try to do something even when it’s hard. (p. 91) Programming: Creating a sequence of instructions, or an algorithm, that makes a computer do something. (p. 11) Sequence: The step-by-step order in which instructions should occur. (p. 11, 23) !144 Rubric for Student Evaluation Unsatisfactory Competent Proficient Excellent Concepts Puzzle levels are not completed. Puzzle levels are completed with 1 star. Puzzle levels completed with 2 stars. Puzzle levels completed with 3 stars. Execution Code does not work or has major flaws preventing it from working correctly (Foo does not get to the objective). Code mostly works, or has minor flaws (garners 1 star). Code works in the way the student intended but is not the most efficient (garners 2 stars). Program is functional, refined, and is executed in the most efficient way possible (garners 3 stars) Grasp of Materials When asked, student When asked, student When asked, student When asked, student can describe how can mostly describe can describe how cannot describe how their code should how their code their code works, their code should work and should work and how they wrote it, work and are troubleshoot some understanding and help others unaware of their problems preventing of content. troubleshoot their process. Worksheets their desired results. Worksheets code. Worksheets incomplete or less Worksheets completed and completed and than 50% correct. completed and 50-65% correct. 81-100% correct. 66-80% correct. Effort Student shows minimal effort, does not use class time effectively, and work is incomplete. Student refuses to explore more than one idea. (ex. puzzle levels incomplete, games created have no code) Student does Completed work in enough to meet an above average minimum manner, although requirements. more could have Student has more been done. Student than one idea but explores multiple does not pursue. (ex. solutions. (ex. puzzle puzzle levels one levels 2 starred, starred, games games created use created use only one more than one type of command) coding command) Completed work and exceeded teacher expectations. Student displays willingness to explore multiple ideas and solutions and asks questions. (ex. puzzle levels 3 starred, games created use multiple items and commands) Rubric inspired from: http://www.edutopia.org/pdfs/blogs/edutopia-yokana-maker-rubric.pdf !145 REFERENCES Common Core Standards: http://www.corestandards.org/Math/Practice/ Student Rubric: http://www.edutopia.org/pdfs/blogs/edutopia-yokana-makerrubric.pdf Tufts & MIT University Studies: http://ase.tufts.edu/DevTech/publications/ !146 Acknowledgments We would like to thank our advisors Dan Leyzberg (Professor of Computer Science, Princeton University), Colleen Davis (Professor of Computer Science, Harvey Mudd University), and Kent Steen (Teacher and Curriculum Specialist for Computer Science). We would also like to thank Courtney Blackwell, Bethany Martin, Evan Rushton, and all the educators who reviewed and gave feedback on the curriculum. Special thanks to Michael Harvey’s 3rd grade class, who found great alternative solutions for our quilt making exercise! Lastly, we would like to thank everyone who has supported and played The Foos! This work is licensed under the Creative Commons AttributionNonCommercial-NoDerivatives 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. !147