Today, Carrie Anne is going to take a look at how those transistors we talked about during the last episode can be used to perform complex actions. With just two states, on and off, the flow of electricity can be used to perform a number of logical operations, which are guided by a branch of mathematics called Boolean Algebra. We’re going to focus on three fundamental operations - NOT, AND, and OR - and show how they were created in a series of really useful circuits. These simple electrical circuits lay the groundwork for our much more complex machines.
This activity introduces the idea of “divide and conquer” using a fictitious but serious problem – a pair of dirty socks have accidentally been wrapped in one of the presents that Santa is about to deliver, and he needs to figure out which one to avoid a child getting a nasty surprise.
You can either play the video (linked in the activity) or download the PDF of the book (see the PDF files in the link to the activity) to read aloud or give to students.
The solution in the story points out that when there are 1024 boxes to test, instead of having to open all of them until the socks are found, one half can be eliminated at a time, and repeatedly halving the problem very quickly narrows it down to one box (the size of the problem starts at 1024, then with one weighing there are 512 boxes, then 256, 128, 64, 32, 16, 8, 4, 2 and 1.) This idea comes up frequently in the design of fast computer algorithms.
Computer programs often need to process a sequence of symbols such as letters or words in a document, or even the text of another computer program. Computer scientists often use a finite-state automaton to do this. A finite-state automaton (FSA) follows a set of instructions to see if the computer will recognize the word or string of symbols. We will be working with something equivalent to a FSA—treasure maps!
The goal of the students is to find Treasure Island. Friendly pirate ships sail along a fixed set of routes between the islands in this part of the world, offering rides to travelers. Each island has two departing ships, A and B, which you can choose to travel on. You need to find the best route to Treasure Island. At each island you arrive at you may ask for either ship A or B (not both). The person at the island will tell you where your ship will take you to next, but the pirates don’t have a map of all the islands available. Use your map to keep track of where you are going and which ship you have traveled on.
Computers are often used to put lists into some sort of order, for example, names into alphabetical order, appointments or e-mail by date, or items in numerical order. Sorting lists helps us find things quickly, and also makes extreme values easy to see. If you sort the marks for a class test into numeric order, the lowest and highest marks become obvious.
If you use the wrong method, it can take a long time to sort a large list into order, even on a fast computer. Fortunately, several fast methods are known for sorting. In this activity, children will discover different methods for sorting and see how a clever method can perform the task much more quickly than a simple one.
Students use computer science to simulate extreme sports, make their own fitness gadget commercial, and create commentary for a big sporting event.
Sports is a complete theme designed to be completed over eight, 45-75 minute, sessions. For each activity, students will watch a series of videos and create one coding project with opportunities to personalize their work using “Add-Ons,” which are mini-coding challenges that build on top of the core project.
Be sure to review the Materials tab for the lesson plan, starter guide, and more.
Users will need a Google account to use this resource.
Searching for a keyword or value is the basis of many computing applications, whether on an internet search engine or looking up a bank account balance.
This activity explores the main algorithms that are used as the basis for searching on computers, using different variations on the game of battleships.
In each of the “Create your own Google logo” activities, students code and design their own versions of the Google logo. These activities introduce students to computer science and the programming language Scratch. These activities are most appropriate for students ages 9-14 and take 15-60 minutes to run.
In Storytelling, students use computer science to tell fun and interactive stories. Storytelling emphasizes creativity by encouraging students to tell a unique story each day.
Storytelling is a complete theme designed to be completed over eight, 45-75 minute sessions. For each Activity, students will watch a series of videos and create one coding project with opportunities to personalize their work using “Add-Ons”, which are mini-coding challenges that build on top of the core project.
This Unit Plan consists of eight activities to be completed over multiple days or weeks.
In Music & Sound, students use the computer to play musical notes, create a music video, and build an interactive music display while learning how programming is used to create music.
Music is a complete theme designed to be completed over eight, 45-75 minute, sessions. For each activity, students will watch a series of videos and create one coding project with opportunities to personalize their work using “Add-Ons,” which are mini-coding challenges that build on top of the core project.
Students take what they've learned through Unit 6 Chapter 1 and develop an app of their own design that uses the circuit board to output information.
Note: You will need to create a free account on code.org before you can view this resource.
This lesson introduces the process the class will use to design games for the remainder of the unit. The class walks through this process in a series of levels. As part of this lesson the class also briefly learns to use multi-frame animations in the Game Lab. At the end of the lesson, they have an opportunity to make improvements to the game to make it their own.
In this multi-day lesson, the class uses the problem-solving process from Unit 1 to create a platform jumper game. After looking at a sample game, the class defines what their games will look like and uses a structured process to build them. Finally, the class reflects on how the games could be improved and implements those changes.
The class plans and builds original games using the project guide from the previous two lessons. Working individually or in pairs, the class plans, develops, and gives feedback on the games. After incorporating the peer feedback, the class shares out the completed games.
This lesson introduces Boolean values and logic, as well as conditional statements. The class starts by playing a simple game of Stand Up, Sit Down in which the Boolean (true/false) statements describe personal properties (hair or eye color, clothing type, age, etc). The class then groups objects based on increasingly complex Boolean statements then looks at how conditionals can impact the flow of a program.
The class starts by using Booleans to compare the current value of a sprite property with a target value, using that comparison to determine when a sprite has reached a point on the screen, grown to a given size, or otherwise reached a value using the counter pattern. After using Booleans directly to investigate the values or sprite properties, the class adds conditional if statements to write code that responds to those Boolean comparisons.
After a brief review of how the counter pattern is used to move sprites, the class is introduced to the properties that set velocity and rotation speed directly. As they use these new properties in different ways, they build up the skills they need to create a basic side scroller game.
The class learns to combine the velocity properties of sprites with the counter pattern to create more complex sprite movement, such as simulating gravity, making a sprite jump, and allowing a sprite to float left or right. In the final levels, the class combines these movements to animate and control a single sprite and build a simple game in which a character flies around and collects coins.
The class programs their sprites to interact in new ways. After a brief review of how they used the isTouching block, the class brainstorms other ways that two sprites could interact. They then use isTouching to make one sprite push another across the screen before practicing with the four collision blocks (collide, displace, bounce, and bounceOff).
This lesson covers functions as a way to organize code, make it more readable, and remove repeated blocks of code. The class learns that higher level or more abstract steps make it easier to understand and reason about steps, then begins to create functions in Game Lab. At the end of the lesson, the class uses these skills to organize and add functionality to the final version of their side scroller game.
In order to create more interesting and detailed images, the class is introduced to the sprite object. Every sprite can be assigned an image to show, and sprites also keep track of multiple values about themselves, which will prove useful when making animations. At the end of the lesson, everyone creates a scene using sprites.
This lesson introduces the draw loop, one of the core programming paradigms in the Game Lab. The class combines the draw loop with random numbers to manipulate some simple animations with dots and then with sprites. Afterward, everyone uses what they learned to update the sprite scene from the previous lesson.
In this cumulative project for Chapter 1, the class plans for and develops an interactive greeting card using all of the programming techniques they've learned to this point.
The class is asked to consider the "problems" of boredom and self-expression and to reflect on how they approach those problems in their own lives. From there, they will explore how Computer Science in general, and programming specifically, plays a role in either a specific form of entertainment or as a vehicle for self-expression.
The class works in groups to design aluminum foil boats that will support as many pennies as possible. At the end of the lesson, groups reflect on their experiences with the activity and make connections to the types of problem-solving they will be doing for the rest of the course.