Classroom Resources

In this activity, students will discover ways that scientists and engineers can use rovers to explore places where humans cannot go. Students will construct a science rover using the LEGO WeDo 2.0 kit and program the rover using WeDo 2.0 Software or a compatible programming app. Students will also document completion of the programming task and evidence of learning how the rover can help scientists make discoveries. 

This activity was demonstrated during the Exploring Today's Classroom (ETC) Summit.

Grade(s)

2

Subject Area

Digital Literacy and Computer Science
Science

Learning Resource Type

Classroom Resource

In this lesson, students will conduct a small amount of research to explore a file format either currently in use or from history. Students will conduct research in order to complete a "one-pager" that summarizes their findings. They will also design a computational artifact (video, audio, graphic, etc.) that succinctly summarizes the advantages of their format over other similar ones.

This lesson is intended to be a quick, short version of a performance task in which students rapidly do some research and respond in writing. It might take two class days but should not take more. The goal is to develop skills that students will use when they complete the actual Explore PT later in the year.

Students will be able to:
- identify reliable sources of information when doing research.
- synthesize information taken from multiple online sources.
- create an artifact (video, image, slide, poster, etc.) to communicate information about a computing topic.

Note: You will need to create a free account on code.org before you can view this resource.

Grade(s)

9, 10, 11, 12

Subject Area

Digital Literacy and Computer Science

Learning Resource Type

Classroom Resource

At the beginning of a new unit, we jump right into an activity - building a small arrangement of LEGO® blocks and then creating text instructions a classmate could follow to construct the same arrangement. Groups will trade instructions to see if they were clear enough to allow reconstruction of the original arrangement. The wrap-up discussion is used to highlight the inherent ambiguities of human language and call out the need for the creation of a programming language which leaves no room for interpretation.

Students will be able to:
- assess the clarity of a set of instructions expressed in human language.
- create a set of instructions in human language for building a simple LEGO block arrangement.
- identify connections between the ability to program and the ability to solve problems.
- describe the ambiguities inherent in human language and the ways programming languages seek to remove those ambiguities.

Note: You will need to create a free account on code.org before you can view this resource.

Grade(s)

9, 10, 11, 12

Subject Area

Digital Literacy and Computer Science

Learning Resource Type

Classroom Resource

This is the second day of a three-lesson sequence in which we attempt to show the "art" of programming and introduce the connection between programming and algorithms. In the previous lesson, we established the need for a common language to express algorithms to avoid ambiguity in how instructions would be interpreted. In this lesson, we continue to establish the connection between programming and algorithms, with more emphasis on the "art" of algorithms.

First, students are presented with a new task for the “human machine” - to write a set of instructions to identify the smallest (lowest value) card in a row of cards on the table. Once again we try to establish a set of fundamental commands for doing this and develop a more formal set of “low-level” commands for manipulating playing cards. Students are presented with a "Human Machine Language" that includes five commands and then must figure out how to use these primitive commands to “program” the same algorithm.

At the conclusion, several points about programming can be made, namely:

1. Different algorithms can be developed to solve the same problem.

2. Different programs can be written to implement the same algorithm.

Students will be able to:
- trace programs written in the "Human Machine Language".
- develop an algorithm to find the smallest playing card in a row of cards
- express an algorithm in the "Human Machine Language".
- identify the properties of sequencing, selection, and iteration the "Human Machine Language".
- evaluate the correctness of algorithms expressed in the "Human Machine Language".

Note: You will need to create a free account on code.org before you can view this resource.

Grade(s)

9, 10, 11, 12

Subject Area

Digital Literacy and Computer Science

Learning Resource Type

Classroom Resource

This is the third of three lessons that make the connection between programming and algorithms. In this lesson, students continue to work with the "Human Machine Language" to get creative designing more algorithms for playing cards. One command is added to the language from the previous lesson (SWAP) that allows positions of cards to change. With the addition of swap, the challenge is to design an algorithm that will move the minimum card to the front of the list while keeping the relative order of all the other cards the same. If that is achieved some other Human Machine Language challenges are available.

Students will be able to:
- develop an algorithm to solve a new problem with playing cards.
- express an algorithm in the Human Machine Language.
- identify Sequencing, Selection, and Iteration in a program written the Human Machine Language.
- describe the properties of the Human Machine Language that make it a "low level" language.

Note: You will need to create a free account on code.org before you can view this resource.

Grade(s)

9, 10, 11, 12

Subject Area

Digital Literacy and Computer Science

Learning Resource Type

Classroom Resource

This lesson is a student's first exposure to programming in App Lab. The lesson begins with a quick reflection prompt. Then students are introduced to the practice of pair programming before beginning to program. For this lesson, the students' view is limited to only a very few simple “turtle” commands to draw graphics on the screen. After a few warm-up exercises, using only combinations of four drawing commands, students must figure out the most “efficient” way to draw an image of a 3x3 grid. The lesson concludes with a sense-making discussion about the meaning of efficiency in programming and the reason behind beginning with such a limited set of programming tools.

Students will be able to:
- use App Lab to write programs that create simple drawings with “turtle graphics.”
- create a program with a partner following the pair programming model.
- explain different ways one might measure the efficiency of a program.

Note: You will need to create a free account on code.org before you can view this resource.

Grade(s)

9, 10, 11, 12

Subject Area

Digital Literacy and Computer Science

Learning Resource Type

Classroom Resource

In this lesson, students learn to define and call procedures (in JavaScript, procedures are called “functions”) in order to create and give a name to a group of commands for easy and repeated use in their code. They will be introduced to functions as a form of abstraction that enables them to write code in larger, more logical chunks and focus on what something does, rather than how it does it. As they explore the use of functions through a sequence of activities in App Lab, they will be asked to think about where they see the need for functions and how these functions can make their code clearer or more concise.

At the end of the lesson, students review the concept of abstraction and are introduced to elements of the Create PT in preparation for the Practice PT at the end of the unit.

Students will be able to:
- recognize functions in programs as a form of abstraction.
- write a program that solves a turtle drawing problem using multiple levels of abstraction (i.e. functions that call other functions within your code).
- explain why and how functions can make code easier to read and maintain.
- define and call simple functions that solve turtle drawing tasks.

Note: You will need to create a free account on code.org before you can view this resource.

Grade(s)

9, 10, 11, 12

Subject Area

Digital Literacy and Computer Science

Learning Resource Type

Classroom Resource

This lesson presents a top-down problem-solving strategy for designing solutions to programming problems. Students use a worksheet to learn about top-down design, and then on paper, design a solution to a new turtle drawing challenge with a partner. Having practiced this approach on paper and in code, students will be presented again with the 3x3 square challenge from an earlier lesson and asked to improve upon their old solution by designing multiple layers of functions.

Students will be able to:
- write a complete program with functions that solve sub-tasks of a larger programming task.
- explain how functions are an example of abstraction.
- use a “top-down” problem-solving approach to identify sub-tasks of a larger programming task.

Note: You will need to create a free account on code.org before you can view this resource.

Grade(s)

9, 10, 11, 12

Subject Area

Digital Literacy and Computer Science

Learning Resource Type

Classroom Resource

Students will learn to read App Lab’s API documentation and will use functions that accept parameters in order to complete a series of drawing puzzles which require them to make use of the App Lab API documentation to learn new drawing commands. Many of these commands will require the use of parameters. The final challenge asks students to design a personal monogram making use of the commands they learned during the lesson.

Students will be able to:
- use parameters to provide different values as input to procedures when they are called in a program.
- use API documentation to assist in writing programs.
- define an API as the set of commands made available by a programming language.

Note: You will need to create a free account on code.org before you can view this resource.

Grade(s)

9, 10, 11, 12

Subject Area

Digital Literacy and Computer Science

Learning Resource Type

Classroom Resource

In this lesson, students practice using and creating functions with parameters. Students learn that writing functions with parameters can generalize solutions to problems even further. Especially in situations where you feel like you are about to duplicate some code with only a few changes to some numbers, that is a good time to write a function that accepts parameters. In the second half of the lesson, students make a series of modifications to a program that creates an “Under the Sea” scene by adding parameters to functions to more easily add variation to the scene. Lastly, students are introduced to App Lab’s random number functions to supply random values to function calls so the scene looks a little different every time the program runs.

Students will be able to:
- write functions with parameters to generalize a solution instead of duplicating code.
- identify appropriate situations for creating a function with parameters.
- use random numbers as inputs to function calls for the purpose of testing.
- add parameters to a function in an existing piece of code to generalize its behavior.

Note: You will need to create a free account on code.org before you can view this resource.

Grade(s)

9, 10, 11, 12

Subject Area

Digital Literacy and Computer Science

Learning Resource Type

Classroom Resource

Students learn to use random values and looping to create variation in their drawings and quickly duplicate objects they wish to appear in their digital scenes many times. Students will be presented with a version of the for loop which only enables them to change the number of times the loop runs. This block is essentially a "repeat" block and will be presented that way. Students will also be presented with blocks which enable them to choose a random number within a given range. Together these blocks enable students to create more complex backgrounds for digital scenes by randomly placing simple objects within the background of their scene. Students use these tools to step through the Under the Sea exemplar digital scene.

Students will be able to:
- use a loop in a program to simplify the expression of repeated tasks.
- identify appropriate situations in a program for using a loop.
- use random values within a loop to repeat code that behaves differently each time it is executed.

Note: You will need to create a free account on code.org before you can view this resource.

Grade(s)

9, 10, 11, 12

Subject Area

Digital Literacy and Computer Science

Learning Resource Type

Classroom Resource

Students use the Google Trends tool in order to visualize historical search data. They will need to identify interesting trends or patterns in their findings and will attempt to explain those trends, based on their own experience or through further research online. Afterward, students will present their findings to ensure they are correctly identifying patterns in a visualization and are providing plausible explanations of those patterns.

Students will be able to:
- use Google Trends to identify and explore connections and patterns within a data visualization.
- accurately describe what a data visualization of a trend is showing.
- provide plausible explanations of trends and patterns observed within a data visualization.

Note: You will need to create a free account on code.org before you can view this resource.

Grade(s)

9, 10, 11, 12

Subject Area

Digital Literacy and Computer Science

Learning Resource Type

Classroom Resource

This lesson asks students to consider carefully the assumptions they make when interpreting data and data visualizations. The class begins by examining how the Google Flu Trends project tried and failed to use search trends to predict flu outbreaks. They will then read a report on the Digital Divide which highlights how access to technology differs widely by personal characteristics like race and income. This report challenges the widespread assumption that data collected online is representative of the population at large. To practice identifying assumptions in data analysis, students are provided with a series of scenarios in which data-driven decisions are made based on flawed assumptions. They will need to identify the assumptions being made (most notably those related to the digital divide) and explain why these assumptions lead to incorrect conclusions.

Students will be able to:
- define the digital divide as the variation in access or use of technology by various demographic characteristics.
- identify assumptions made when drawing conclusions from data and data visualizations.

Note: You will need to create a free account on code.org before you can view this resource.

Grade(s)

9, 10, 11, 12

Subject Area

Digital Literacy and Computer Science

Learning Resource Type

Classroom Resource

Students begin this lesson by investigating some of the world’s biggest data breaches to get a sense for how frequently data breaches happen within companies and organizations, and what kinds of data and information is lost or given up. Afterward, students will use the Data Privacy Lab tool to investigate just how easily they could be uniquely identified with a few seemingly innocuous pieces of information. At the conclusion of the lesson, students will research themselves online to determine just how much someone could learn about them by conducting the same searches and “connecting the dots.”

Students will be able to:
- explain privacy concerns that arise through the mass collection of data.
- use online search tools to find and connect information about a person or topic of interest.
- explain how multiple sources of data can be combined in order to uncover new knowledge or information.
- analyze the personal privacy and security concerns that arise with any use of computational systems.

Note: You will need to create a free account on code.org before you can view this resource.

Grade(s)

9, 10, 11, 12

Subject Area

Digital Literacy and Computer Science

Learning Resource Type

Classroom Resource

This lesson focuses on the economic and consumer concerns around apps and websites that collect and track data about you in exchange for providing you a service free of cost. Often the quality of the service itself is dependent on having access to data about many people and their behavior. The main takeaway of the lesson is that students should be more informed consumers of the technology around them. They should be able to explain some of the trade-offs between maintaining personal privacy and using innovative software free of cost.

Students will be able to:
- explain how and why personal data is exchanged for the use of free software.
- explain some of the privacy and economic tradeoffs involved in the collection and use of personal data.
- describe the ways and reasons organizations collect information about individuals.
- read and critically evaluate a data privacy policy.

Note: You will need to create a free account on code.org before you can view this resource.

Grade(s)

9, 10, 11, 12

Subject Area

Digital Literacy and Computer Science

Learning Resource Type

Classroom Resource

In this lesson, students are introduced to the need for encryption and simple techniques for breaking (or cracking) secret messages. Students try their own hand at cracking a message encoded with the classic Caesar cipher and also a Random Substitution Cipher. Students should become well-acquainted with the idea that in an age of powerful computational tools, techniques of encryption will need to be more sophisticated. The most important aspect of this lesson is to understand how and why encryption plays a role in all of our lives every day on the Internet, and that making good encryption is not trivial. Students will get their feet wet with understanding the considerations that must go into making strong encryption in the face of powerful computational tools that can be used to crack it. The need for secrecy when sending bits over the Internet is important for anyone using the Internet.

Students will be able to:
- explain why encryption is an important need for everyday life on the Internet.
- crack a message encrypted with a Caesar cipher using a Caesar Cipher Widget.
- crack a message encrypted with random substitution using Frequency Analysis.
- explain the weaknesses and security flaws of substitution ciphers.

Note: You will need to create a free account on code.org before you can view this resource.

Grade(s)

9, 10, 11, 12

Subject Area

Digital Literacy and Computer Science

Learning Resource Type

Classroom Resource

In this lesson, students learn about the relationship between cryptographic keys and passwords. Students explore the Vigenère cipher with a widget to examine how a cryptographic "key" can be used to encrypt and decrypt a message. Then, students use a tool that shows them about how long it would take to crack a given password using a standard desktop computer. Students experiment with what makes a good password and answer questions about the “human components” of cybersecurity.

Students will be able to:
- explain the relationship between cryptographic keys and passwords.
- explain in broad terms what makes a key difficult to “crack.”
- reason about strong vs. weak passwords using a tool that shows password strength.
- understand that exponential growth is related to an encryption algorithm’s strength.
- explain how and why the Vigenère cipher is a stronger form of encryption than plain substitution.
- explain properties that make for a good key when using the Vigenère Cipher.

Note: You will need to create a free account on code.org before you can view this resource.

Grade(s)

9, 10, 11, 12

Subject Area

Digital Literacy and Computer Science

Learning Resource Type

Classroom Resource

In this lesson, students continue their exploration of computationally hard problems as they investigate a one-way function, a problem which is easy to construct in such a way that you know the solution, but it is computationally hard to solve. Students will begin the lesson by trying to solve the “Wireless Hotspot Problem” (also known as the vertex cover or dominating sets problem) to experience first-hand the challenge of solving it. They will then be instructed on how easy it is to create such a problem and will practice doing so themselves. In the Wrap-up, students are introduced to the concept of a one-way function and consider why such problems might be useful tools when constructing methods of encryption. If it’s easy to create a problem that is hard for a computer (or human!) to solve, then perhaps it is possible to make truly secure encryptions.

Students will be able to:
- describe the properties of a one-way function.
- construct a wireless hotspot map, starting from a solution key.
- explain why the wireless hotspot problem is a computationally hard problem.
- describe the difference between the Traveling Salesman Problem and the Wireless Hotspot Problem and why one-way functions are desirable when creating cryptographic methods.

Note: You will need to create a free account on code.org before you can view this resource.

Grade(s)

9, 10, 11, 12

Subject Area

Digital Literacy and Computer Science

Learning Resource Type

Classroom Resource

This is a big multi-part lesson that introduces the concept of public key cryptography which is an answer to the crucial question: How can two people send encrypted messages back and forth over insecure channels (the Internet) without meeting ahead of time to agree on a secret key? In a nutshell, there are two main principles we want students to understand:

  1. The mechanics of communication with public key cryptography
  2. The basic mathematical principles that make it possible

The lesson gets at these two core ideas through a deliberate chain of thought experiments, demonstrations, activities, and widgets. All parts are building blocks that lead to a deeper understanding of how it works.

Students will be able to:
- explain what the modulo operation does and how it operates as a "one-way" function.
- follow an asymmetric encryption algorithm to encrypt a numerical message using the Public Key Crypto widget.
- explain the difference between symmetric and asymmetric encryption.
- describe the basic process of encrypting data using public key encryption.
- explain the benefits of public key cryptography.

Note: You will need to create a free account on code.org before you can view this resource.

Grade(s)

9, 10, 11, 12

Subject Area

Digital Literacy and Computer Science

Learning Resource Type

Classroom Resource

Students learn about various types of cybercrimes and the cybersecurity measures that can help prevent them. Then students perform a Rapid Research project investigating a particular cybercrime event with a focus on the data that was lost or stolen and the concerns that arise as a result. The Rapid Research activity features vocabulary, concepts, and skills that should help prepare them for the AP Explore PT, and also serves as a capstone for the sequence of lessons on encryption and security.

Students will be able to:
- explain the characteristics of a phishing attack.
- explain how a DDoS attack works.
- describe how one computer virus works.
- research and describe a cyber attack found in the news.
- reason about the threats posed by, and methods of recourse for, various types of cyber attacks.
- describe plausible storage, security, or privacy concerns for particular pieces of data.

Note: You will need to create a free account on code.org before you can view this resource.

Grade(s)

9, 10, 11, 12

Subject Area

Digital Literacy and Computer Science

Learning Resource Type

Classroom Resource

To conclude their study of big data and cryptography, students will complete a small research project related to a dilemma presented by Big Data or Cybersecurity, in the form of a Practice Performance Task. Students will pick one of two issues to research more deeply - either an issue related to big data, or one related to cybersecurity. Students will need to identify appropriate online resources to learn about the functionality, context, and impact of the technological innovation that gave rise to the dilemma they are investigating. After completing their research, students will present their findings both in a written summary and with an audio/visual artifact they found online. The written components students must complete are similar to those students will see in the AP Performance Tasks.

This project is an opportunity to practice many of the skills students will use when completing the Explore Performance Task on the AP® Exam at the end of the year. While an open-ended research project might be intimidating, students have built all the skills they need to complete this task.

Note: This is NOT the official AP® Performance Task that will be submitted as part of the Advanced Placement exam; it is a practice activity intended to prepare students for some portions of their individual performance at a later time.

Students will be able to:
- identify reliable and authoritative sources of information about computing information.
- synthesize information taken from multiple online sources to create a cohesive description of a computing innovation.
- identify an artifact that clarifies an aspect of a computing topic not easily captured in writing.
- explain both the beneficial and harmful effects related to a modern social dilemma in computing.

Note: You will need to create a free account on code.org before you can view this resource.

Grade(s)

9, 10, 11, 12

Subject Area

Digital Literacy and Computer Science

Learning Resource Type

Classroom Resource

In this lesson, students add variables to two different exemplary apps to keep track of a score or a count of some number of button clicks. The major topic is variable in scope and understanding the differences, benefits, and drawbacks, of using global versus local variables. This lesson focuses more on using global variables since in event-driven apps that’s what you need to keep track of data across multiple events.

The very basics of a simple if statement are also presented in this lesson, mostly to highlight the difference between the = and == operators. Finally, students are asked to apply what they’ve learned about variables, scope, and if statements, to make their own “clicker” game modeled after one of the exemplars they saw during the lesson.

Students will be able to:
- use global variables to track numeric data in an app.
- give a high-level explanation of what “variable scope” means.
- debug problems related to variable scoping issues.
- modify existing programs to add and update variables to track information.
- create a multi-screen "clicker" game from scratch.

Note: You will need to create a free account on code.org before you can view this resource.

Grade(s)

9, 10, 11, 12

Subject Area

Digital Literacy and Computer Science

Learning Resource Type

Classroom Resource

In this lesson, students are introduced to the string data type as a way of representing arbitrary sequences of ASCII characters. They will use strings to accept input from a user as they work on mastering two new UI elements, the text input, and the text area. Students combine these skills to develop a simple Mad Libs® app.

Mad Libs® is a trademark of the Penguin Group (USA) LLC., which does not sponsor, authorize or endorse this site.

Students will be able to:
- identify strings as a unique data type which contains a sequence of ASCII characters.
- describe the characteristics of the string data type.
- accept string input in a program.
- manipulate user-generated string input to generate dynamic output.

Note: You will need to create a free account on code.org before you can view this resource.

Grade(s)

9, 10, 11, 12

Subject Area

Digital Literacy and Computer Science

Learning Resource Type

Classroom Resource

This lesson attempts to walk students through the iterative development process of building an app (basically) from scratch that involves the use of if statements. Following an imaginary conversation between two characters - Alexis and Michael - students follow the problem solving and program design decisions they make for each step of constructing the app. Along the way, they decide when and how to break things down into functions, and of course, discuss the logic necessary to make a simple game.

The last step - writing code that executes an end-of-game condition - students must do on their own. How they decide to use if statements to end the game will require some creativity. The suggested condition - first to score 10 points - is subtly tricky and can be written in many different ways.

At the conclusion of the lesson, there is three practice Create PT-style questions as well as resources explaining the connection between this lesson and the actual Create PT. Depending on how you use these materials they can easily add an additional day to this lesson.

Students will be able to:
- write code to implement solutions to problems from pseudocode or description.
- follow the iterative development process of a collaboratively created program.
- develop and write code for conditional expressions to incorporate into an existing program.
- write a large program from scratch when given directions for each step.

Note: You will need to create a free account on code.org before you can view this resource.

Grade(s)

9, 10, 11, 12

Subject Area

Digital Literacy and Computer Science

Learning Resource Type

Classroom Resource

This lesson demonstrates how a slight manipulation of a conditional statement can allow for the creation of a new and powerful tool in constructing programs, a while loop. Students are introduced to a while loop by analyzing the flow chart of a conditional statement in which the "true" branch leads back to the original condition. Students design their own flowcharts to represent a real-world situation that could be represented as a while loop, and they learn how to recognize common looping structures, most notably infinite loops. Students then move to App Lab, creating a while loop that runs exactly some predetermined number of times. While learning about creating while loops, students will be introduced to many of the common mistakes early programmers make with while loops and will be asked to debug small programs. They finally progress to putting if statements inside a while loop to count the number of times an event occurs while repeating the same action. This activity will recall the need for counter variables and foreshadows their further use in the following lesson.

Students will be able to:
- explain that a while loop continues to run while a boolean condition remains true.
- translate a real-life activity with repeated components into a form that could be represented by a while loop.
- analyze a while loop to determine if the initial condition will be met, how many times the loop will run, and if the loop will ever terminate.
- write programs that use while loops in a variety of contexts.

Note: You will need to create a free account on code.org before you can view this resource.

Grade(s)

9, 10, 11, 12

Subject Area

Digital Literacy and Computer Science

Learning Resource Type

Classroom Resource

In this lesson, students gain more practice using while loops as they develop a simulation that repeatedly flips coins until certain conditions are met. The lesson begins with an unplugged activity in which students flip a coin until they get five heads in total, and then again until they get three heads in a row. They will then compete to predict the highest outcome in the class for each statistic. This activity motivates the programming component of the lesson in which students develop a program that allows them to simulate this experiment for higher numbers of heads and longer streaks.

Students will be able to:
- use a while loop in a program to repeatedly call a block of code.
- use variables, iteration, and conditional logic within a loop to record the results of a repeated process.
- identify instances where a simulation might be useful to learn more about real-world phenomena.
- develop a simulation of a simple real-world phenomenon.

Note: You will need to create a free account on code.org before you can view this resource.

Grade(s)

9, 10, 11, 12

Subject Area

Digital Literacy and Computer Science

Learning Resource Type

Classroom Resource

This lesson introduces arrays as a means of storing lists of information within a program. The class begins by highlighting the difficulties that arise when trying to store lists of information in a variable. Students then watch a short video introducing arrays and a subset of the operations that can be performed with them. Students will work in Code Studio for the remainder of the class as they practice using arrays in their programs. At the conclusion of the sequence, students build a simple app which can be used to store and cycle through a list of their favorite things. In the next lesson, students will continue working with a version of this app that can display images and not just text strings.

Students will be able to:
- identify an array as a data structure used to store lists of information in programs.
- create arrays and access information stored within them using an index.
- manipulate an array using the append, insert, and remove operations.
- account for the fact that JavaScript arrays are zero-indexed when using them in a program.

Note: You will need to create a free account on code.org before you can view this resource.

Grade(s)

9, 10, 11, 12

Subject Area

Digital Literacy and Computer Science

Learning Resource Type

Classroom Resource

Students will extend the My Favorite Things app they built in the previous lesson so that it now manages and displays a collection of images and responds to key events. Students are introduced to the practice of refactoring code in order to keep programs consistent and remove redundancies when adding new functionality. As part of learning to use key events, students are shown that event handlers pass a parameter which contains additional information about the event. This lesson also serves as further practice at using arrays in programs.

Students will be able to:
- use an array to maintain a collection of data in a program.
- create apps that allow user interaction through key events.
- refactor code in order to appropriately incorporate new functionality while maintaining readability and consistency.

Note: You will need to create a free account on code.org before you can view this resource.

Grade(s)

9, 10, 11, 12

Subject Area

Digital Literacy and Computer Science

Learning Resource Type

Classroom Resource

This lesson will probably take two days to complete. It introduces students to algorithms that process lists of data. The students will do two unplugged activities related to algorithms and program some of them themselves in App Lab. The for loop is re-introduced to implement these algorithms because it’s straightforward to use to process all the elements of a list. The lesson begins with an unplugged activity in which students write an algorithm to find the minimum value in a hand of cards. Students then move to Code Studio to write programs that use loops and arrays. Students are shown how to use a for loop to visit every element in an array. Students use this pattern to process an array in increasingly complex ways. At the end of the progression, students will write functions which process arrays to find or alter information, including finding the minimum value - a problem they worked on in the unplugged activity. Finally, an unplugged activity has students reason about linear vs. binary search and attempt to write pseudocode for a binary search.

Students will be able to:
- use a for loop in a program to implement an algorithm that processes all elements of an array.
- write code that implements a linear search on an unsorted array of numbers.
- write code to find the minimum value in an unsorted list of numbers.
- explain how binary search is more efficient than linear search but can only be used on sorted lists.

Note: You will need to create a free account on code.org before you can view this resource.

Grade(s)

9, 10, 11, 12

Subject Area

Digital Literacy and Computer Science

Learning Resource Type

Classroom Resource

In this lesson, students are introduced to the return command and learn to write their own functions that return values. Students first complete a simple unplugged activity based on the game Go Fish to introduce the concept of a return value. They will then complete a short sequence of exercises in Code Studio, which introduces preferred patterns for writing functions that return values. At the end of the sequence, students write and use functions that return values in a simple turtle driver app.

Students will be able to:
- use the return command to design functions.
- identify instances when a function with a return value can be used to contain frequently used computations within a program.
- design functions that return values to perform frequently needed computations within a program.

Note: You will need to create a free account on code.org before you can view this resource.

Grade(s)

9, 10, 11, 12

Subject Area

Digital Literacy and Computer Science

Learning Resource Type

Classroom Resource

Students continue to practice working with arrays and are introduced to a new user interface element, the canvas. The canvas includes commands for drawing simple geometric shapes (circles, rectangles, lines) and also triggers mouse and key events like any other user interface element. Over the course of the lesson, students combine these features to make an app that allows a user to draw an image while recording every dot drawn on the canvas in an array. By processing this array in different ways, the app will allow students to redraw their image in different styles, like random, spray paint, and sketching. Along the way, students use their knowledge of functions with return values to make code which is easy to manage and reuse.

Students will be able to:
- programmatically control the canvas element in response to user interactions.
- maintain a dynamically generated array through the running of a program in order to record and reuse user input.
- use nested loops within a program to repeat a command on the same array index multiple times.
- perform variable arithmetic within an array index to access items in an array by their relative position.

Note: You will need to create a free account on code.org before you can view this resource.

Grade(s)

9, 10, 11, 12

Subject Area

Digital Literacy and Computer Science

Learning Resource Type

Classroom Resource

In this kickoff to the Data Unit, students begin thinking about how data is collected and what can be learned from it. To begin the lesson, students will take a short online quiz that supposedly determines something interesting or funny about their personality. Afterwards, they will brainstorm other sources of data in the world around them, leading to a discussion of how that data is collected. This discussion motivates the introduction of the Class Data Tracker project that will run through the second half of this unit. Students will take the survey for the first time and be shown what the results will look like. To close the class, students will make predictions of what they will find when all the data has been collected in a couple of weeks.

Students will be able to:
- develop a hypothesis about student behavior over time, based on a small sample of data.
- describe sources of data appropriate for performing computations.

Note: You will need to create a free account on code.org before you can view this resource.

Grade(s)

9, 10, 11, 12

Subject Area

Digital Literacy and Computer Science

Learning Resource Type

Classroom Resource

This is a pretty fun lesson that has two main parts. First students warm up by reflecting on the reasons data visualizations are used to communicate about data. This leads to the main activity in which students look at some collections of (mostly bad) data visualizations, rate them, explain why a good one is effective, and also suggest a fix for a bad one.

In the second part of the class, students compare their experiences and create a class list of common faults and best practices for creating data visualizations. Finally, students review and read the first few pages of "Data Visualization 101: How to design charts and graphs" to see some basic principles of good data visualizations and see how they compare with the list the class came up with.

Students will be able to:
- identify an effective data visualization and give justification.
- collaborate to investigate and evaluate a data visualization.
- suggest an appropriate visualization for some data.
- evaluate a data visualization for the effectiveness of communication.
- identify a poor data visualization and give justification.

Note: You will need to create a free account on code.org before you can view this resource.

Grade(s)

9, 10, 11, 12

Subject Area

Digital Literacy and Computer Science

Learning Resource Type

Classroom Resource

Now that students have had the chance to see and evaluate various data visualizations, they will learn to make visualizations of their own. This lesson teaches students how to build visualizations from provided datasets. The levels in Code Studio provide a detailed walkthrough of how to use Google Sheets to create several different kinds of charts. While this lesson focuses on the Google Sheets tool, other tools may be substituted at the teacher’s discretion, and MS Excel support is coming soon to the lesson.

The main activity teaches students to build different chart types (scatter, line, and bar charts) from a single data set. It should be emphasized to students that the purpose of this lesson is to explore and experiment with creating different types of visualizations, not to build the perfect chart. Students will have a chance to create and customize their own charts. At the end of class, students compare their custom visualizations with those of their classmates.

Students will be able to:
- select the appropriate type of data visualization to discover trends and patterns within a dataset.
- create a bar, line, and scatter chart from a dataset using a computational tool.
- use the settings of a data visualization tool to manipulate and refine the features of a data visualization.

Note: You will need to create a free account on code.org before you can view this resource.

Grade(s)

9, 10, 11, 12

Subject Area

Digital Literacy and Computer Science

Learning Resource Type

Classroom Resource
ALSDE LOGO