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.
Computers draw lines and circles during many common tasks, such as using an image editor. But how does a computer know which pixels to darken to make a line?
Students will discover two common algorithms used to draw a line between two points and a circle of a given radius.
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.
In Fashion & Design, students learn how computer science and technology are used in the fashion industry while building fashion-themed programs, like a fashion walk, a stylist tool, and a pattern maker.
Fashion & Design 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 contains eight lessons which culminate in a unit project. Lessons can be completed individually if students have some experience with Scratch.
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.
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.
Students, working with a partner or team will brainstorm physical devices they wish to prototype. Students have the option to design a new creation or recreate a device they have found in the "real world". Students will complete a planning guide to determine the resources (physical and digital) they will need to create their prototype. Students will design a user interface (typically an app or circuit board) that may control some output device (like a circuit board). It will be necessary for students to develop pseudocode or algorithms to aid in the coding process. Students will need to complete the problem-solving process during this lesson plan which will include testing a revising the prototype.
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.
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.
This lesson dives deeper into the concept of processing that was introduced as part of the definition of a computer. Pairs work together to put a deck of cards in order, a form of processing information. In the end, the class discusses what processing means within the context of solving information problems.
This lesson covers the input and output aspects of computers in a context that is relevant and familiar to students: apps. The class evaluates various web applications to analyze the specific problems that they were designed to solve, the inputs that they need to work, and the outputs they provide to users. The class concludes with observations of these apps as well as a teacher-led discussion about the impact of apps on society.