This activity will begin with a short lesson on debugging and persistence and then will quickly move to a race against the clock as students break into teams and work together to write a program one instruction at a time.
Teamwork is very important in computer science. Teams write and debug code with each other, instead of working as individuals. In this lesson, students will learn to work together while being as efficient as possible.
This activity also provides a sense of urgency that will teach students to balance their time carefully and avoid mistakes without falling too far behind. This experience can be stressful (which is expected)! Make sure you provide students with the tools to deal with potential frustration.
Students will be able to:- define ideas using code and symbols.- verify work done by teammates.- identify signs of frustration.
Note: You will need to create a free account on code.org before you can view this resource.
In this online activity, students will practice debugging in the "collector" environment. Students will get to practice reading and editing code to fix puzzles with simple algorithms, loops, and nested loops.
The purpose of this lesson is to teach students that failure is normal when learning a new skill. Students will be given pre-written programs that do NOT work. They will be asked to fix these programs. This process, called "debugging", teaches students essential problem solving and critical thinking skills. These skills transfer over as students proceed to harder and harder programming projects.
Students will be able to:- read and comprehend the given code.- identify a bug and the problems it causes in a program.- describe and implement a plan to debug a program.
Note: You will need to create a free account on code.org before you can view this resource.
In this online activity, students will learn what events are and how computers use them in programs like video games. Students will work through puzzles making the program react to events (like arrow buttons being pressed). At the end of the puzzle, students will have the opportunity to customize their game with different speeds and sounds.
In this lesson, students will develop their understanding of events by making a sports-based game. Students will learn to make their paddle move according to arrow keys and make noises when objects collide. At the very end, they will get to customize their game to make it more unique!
Students will be able to:- identify actions that correlate to input events.- create an interactive game using sequence and event-handlers.- share a creative artifact with other students.
As a quick update (or introduction) to using loops, this stage will have students using the repeat block to get Scrat to the acorn more efficiently.
In this lesson, students will be learning more about loops and how to implement them in Blockly code. Using loops is an important skill in programming because manually repeating commands is tedious and inefficient. With these Code.org puzzles, students will learn to add instructions to existing loops, gather repeated code into loops, and recognize patterns that need to be repeated.
Students will be able to:- construct a program using structures that repeat areas of code.- improve existing code by finding areas of repetition and moving them into looping structures.
This lesson builds on the understanding of loops from previous lessons and gives students a chance to be truly creative. This activity doubles as a debugging exercise for extra problem-solving practice.
This series highlights the power of loops with an array of puzzles meant to get students thinking about why repeat loops are superior to longhand.
Students will be able to:- identify the benefits of using a loop structure instead of manual repetition.- differentiate between commands that need to be repeated in loops and commands that should be used on their own.
In this online activity, students will have the opportunity to push their understanding of loops to a whole new level. Playing with the Bee and Plants vs. Zombies, students will learn how to program a loop to be inside of another loop. They will also be encouraged to figure out how little changes in either loop will affect their program when they click Run.
In this introduction to nested loops, students will go outside of their comfort zone to create more efficient solutions to puzzles. In earlier puzzles, loops pushed students to recognize repetition. Here, students will learn to recognize patterns within repeated patterns to develop these nested loops. This stage starts off by encouraging students to try to solve a puzzle where the code is irritating and complex to write out the long way. After a video introduces nested loops, students are shown an example and asked to predict what will happen when a loop is put inside of another loop. This progression leads to plenty of practice for students to solidify and build on their understanding of looping in programming.
Students will be able to:- break complex tasks into smaller repeatable sections.- recognize large repeated patterns as made from smaller repeated patterns.- identify the benefits of using a loop structure instead of manual repetition.
Now that students know how to layer their loops, they can create so many beautiful things. This lesson will take students through a series of exercises to help them create their own portfolio-ready images using Anna and Elsa's excellent ice-skating skills!
In this series, students will get practice nesting loops while creating images that they will be excited to share. Beginning with a handful of instructions, students will make their own decisions when it comes to creating designs for repetition. They will then spin those around a variety of ways to end up with a work of art that is truly unique.
Students will be able to:- break apart code into the largest repeatable sequences using both loops and nested loops.- recognize the difference between using a loop and a nested loop.- describe when a loop, nested loop, or no loop is needed.
By the time students reach this lesson, they should already have plenty of practice using repeat loops, so now it's time to mix things up.
While loops are loops that continue to repeat commands while a condition is met. While loops are used when the programmer doesn't know the exact number of times commands need to be repeated but does know what condition needs to be true in order for the loop to continue repeating. For example, students will be working to fill holes and dig dirt in Farmer. They will not know the size of the holes or the height of the mountains of dirt, but the students will know they need to keep filling the holes and digging the dirt as long as the ground is not flat.
As your students continue to deepen their knowledge of loops, they will come across problems where a command needs to be repeated, but it is unknown how many times it needs to be repeated. This is where while loops come in. In today's lesson, students will develop a beginner's understanding of condition-based loops and also expand their knowledge of loops in general.
Students will be able to:- distinguish between loops that repeat a fixed number of times and loops that repeat as long as a condition is true.- use a while loop to create programs that can solve problems with unknown values.
In this lesson, students will learn about until loops. Students will build programs that have the main character repeat actions until they reach their desired stopping point.
This set of puzzles will work to solidify and build on the knowledge of loops by adding the until conditional. By pairing these concepts together, students will be able to explore the potential for creating complex and innovative programs.
Students will be able to:- build programs with the understanding of multiple strategies to implement conditionals.- translate spoken language conditional statements and loops into a program.
This lesson demonstrates how conditionals can be used to tailor a program to specific information. We don’t always have all of the information we need when writing a program. Sometimes you will want to do something different in one situation than in another, even if you don't know what situation will be true when your code runs. That is where conditionals come in. Conditionals allow a computer to make a decision, based on the information that is true any time your code is run.
One of the best parts of teaching conditionals is that students already understand the concept from their everyday lives.
This lesson merges computer science into the real world by building off of students ability to tell if a condition is true or false. Students will learn to use if statements to declare when a certain command should be run, as well as if/else statements to declare when a command should be run and what do run otherwise. Students may not recognize the word conditionals, but most students will understand the idea of using "if" to make sure that some action only occurs when it is supposed to.
Students will be able to:- define circumstances when certain parts of a program should run and when they shouldn't.- determine whether a conditional is met based on criteria.- traverse a program and predict the outcome, given a set of input.
Up until this point, students have been writing code that executes exactly the same way each time it is run - reliable, but not very flexible. In this lesson, your class will begin to code with conditionals, allowing them to write code that functions differently depending on the specific conditions the program encounters.
After being introduced to conditionals in "Conditionals with Cards", students will now practice using them in their programs. The if / else blocks will allow for a more flexible program. The bee will only collect nectar if there is a flower or make honey if there is a honeycomb. Students will also practice and recognize a connection between if / else blocks and while loops in this set of puzzles.
if / else
Students will be able to:- translate spoken language conditional statements into a program.- solve puzzles using a combination of looped sequences and conditionals.
Students will practice while loops, until loops, and if / else statements. All of these blocks use conditionals. By practicing all three, students will learn to write complex and flexible code.
Practicing the use of conditionals in different scenarios helps to develop a student's understanding of what conditionals can do. In the previous lesson, students only used conditionals to move around a maze. In this lesson, students will use conditionals to help the farmer know when to harvest crops. New patterns will emerge and students will use creativity and logical thinking to determine the conditions where code should be run and repeated.
Students will be able to:- nest conditionals to analyze multiple value conditions using if, else if, else logic.- pair a loop and conditional statement together.
In this online activity, students will have the opportunity to learn how to use events in Play Lab and to apply all of the coding skills they've learned to create an animated game. It's time to get creative and make a game in Play Lab!
Students will use events to make characters move around the screen, make noises, and change backgrounds based on user input. This lesson offers a great introduction to events in programming and even gives a chance to show creativity! At the end of the puzzle sequence, students will be presented with the opportunity to share their projects.
Students will be able to:- create an animated, interactive game using sequence and events.- identify actions that correlate to input events.
This series of online lessons will have students learning to make images using on and off. This will help reinforce the fact that computers can do a multitude of things with 0s and 1s.
Students will be able to:- create pictures using unique combinations of on and off.- identify repeated sequences and break long codes up into smaller chunks that can be looped.- utilize loops and binary code to recreate provided images.