Please enable JavaScript to use CodeHS

AP Computer Science Principles in Roblox

Description

In this lesson, students will learn about different aspects of computer science. They will find examples in the real world and learn about programming as one example of computer science.

Objective

Students will be able to:

  • Define code, programs, and algorithms
  • Understand its significance in our daily lives
Description

In this lesson, students will learn how to print messages out onto the console using the Lua command print.

Objective

Students will be able to:

  • Write a Lua program by typing commands with proper syntax
  • Write a program that prints out a message to the user
Description

In this lesson, students are introduced to Roblox studio — familiarizing them with the different options and menus need to design their Roblox creations. They also learn about the parent/child hierarchy which plays a big part in developing Roblox games.

Objective

Students will be able to:

  • Navigate through Roblox Studio
  • Create and use scripts in Roblox
  • Explain and use the parent/child hierarchy
Description

In this lesson, students review the Roblox Studio interface and explore the transformation tools while editing their first part and model.

Objective

Students will be able to:

  • Understand and navigate the Roblox Studio interface
  • Create a part and add a model
  • Edit the size, position, and orientation of a part and model
  • Understand part properties such as Anchored
Description

In this lesson, students learn how to assign values to variables, manipulate those variable values, and use them in program statements. This is the introductory lesson into how data can be stored in variables.

Objective

Students will be able to:

  • Explain what variables are and what they are used for
  • Use the different types of variables in Lua
  • Distinguish between declaring, initializing and assigning variables
  • Create their own variables with proper naming conventions
  • Print out the values stored in variables
Description

In this lesson, students learn about the different mathematical operators they can use to perform mathematical computations and create useful programs that compute information for the user.

Objective

Students will be able to:

  • Describe the different mathematical operators we can use in programs
  • Create programs that use basic math to compute useful things
  • Create programs that take in user input, do simple computations with the input, and produce useful output
Description

In this lesson, students will learn how to create basic functions using Lua and use them to improve the organization, readability, and flow of their programs. They will also learn how to implement the Touched function in their Roblox programs.

Objective

Students will be able to:

  • Explain the difference between defining and calling a function
  • Use functions in order to manage the flow of their programs
  • Increase the readability and organization of their code using functions
Description

Debugging is a very important part of programming. In this lesson, students learn how to effectively debug their programs.

Objective

Students will be able to:

  • Use debugging strategies to find and fix errors in their code
  • Explain the difference between syntax, logic and runtime errors
  • Use tools to help debug their code
Description

In this lesson, students will learn about abstraction and APIs. Abstraction is the act of managing complexity by dissociating information and details in order to focus on relevant concepts. An API (application programming interface) is a set of tools for building programs.

Objective

Students will be able to:

  • Understand abstraction as the different levels of detail and complexity
  • Understand the importance of abstracting away complexity to solve problems more efficiently
  • Understand the use and purpose of APIs
Description

In this lesson, students review content with a multiple-choice unit quiz.

Objective

Students will be able to:

  • Prove their knowledge of basic coding concepts through a multiple-choice quiz
Description

In this lesson, students learn about if and if/else statements as a way to make decisions and execute specific code depending on the validity of a condition. They will also learn about and use Boolean values. Booleans refer to a value that is either true or false and are used to test whether a specific condition is true or false.

Objective

Students will be able to:

  • Create Boolean variables to represent meaningful yes/no values
  • Print out the value of a Boolean variable
  • Explain the purpose of if and if/else statements
  • Create their own if/else statements to selectively choose which code is executed in their programs
Description

In this lesson, students will learn about comparison and logical operators. Comparison operators let students compare two values. Logical operators allow students to connect or modify Boolean expressions. Three logical operators are not, and, and or.

Objective

Students will be able to:

  • Explain the meaning of each of the comparison operators (<, <=, >, >=, ==, ~=)
  • Describe the meaning and usage of each logical operator: not, and, and or
  • Construct logical statements using boolean variables and logical operators
  • Create programs using the comparison operators to compare values
  • Predict the boolean result of comparing two values
  • Print out the boolean result of comparing values
Description

In this lesson, students learn about the importance of planning when writing complex programs. Students learn that flowcharts and pseudocode are essential tools that help break down a problem.

Objective

Students will be able to:

  • Explain the role of pseudocode and flow charts in writing complex programs
  • Explain how adding comments make a program clearer and more readable
Description

In this lesson, students take what they have learned about using operators and apply that to Roblox Studio programs.

Objective

Students will be able to:

  • Use logical and comparison operators in a Roblox program
Description

In this lesson, students will learn how randomization can enhance a program.

Objective

Students will be able to:

  • Explain why random numbers are a useful part of computer programs
  • Create and use random values in a program
Description

In this lesson, students will explore while loops and variables. This combines the ideas of creating variables, updating variables throughout a loop, and determining the correct ending condition.

Objective

Students will be able to:

  • Explain the purpose of a while loop
  • Create while loops to repeat code while a condition is true
  • Utilize while loops to solve new types of problems
Description

In this lesson, students will learn about for loops. For loops are used to repeat code a fixed number of times. Students will learn how to create and use for loops and how to decide whether a for loop or a while loop is required for the situation.

Objective

Students will be able to:

  • Create for loops in Lua
  • Explain the purpose of for loops
  • Utilize for loops to avoid typing out repeated code
Description

In this lesson, students will learn how to “clean up” their Roblox programs by preventing a player from activating an event too often. Students will learn how to use a break statement to end a loop and a debouncing technique to prevent a function from running too many times.

Objective

Students will know how to:

  • Use a break statement to end a loop
  • Use a debouncing technique to prevent a function from running more times then intended
Description

In this lesson, students are reintroduced to algorithms. Algorithms are step-by-step instructions that solve a problem. Programs implement algorithms. All algorithms are built using sequencing, selection, and iteration. This lesson is designed to test students’ knowledge of control structures and algorithm design in preparation for upcoming concepts.

Objective

Students will be able to:

  • Analyze an algorithm and explain why it works
  • Use control structures to create general algorithms
Description

In this lesson, students review content with a multiple-choice unit quiz.

Objective

Students will be able to:

  • Prove their knowledge of basic coding concepts through a multiple-choice quiz
Description

In this practice performance task, students will use pair programming to build an obby that includes functions, loops, conditionals, and variables.

Objective

Students will be able to:

  • Develop an algorithm and implement it using Roblox’s library of commands and conditions
  • Collaborate in the development of programs
  • Make a plan for their solution by breaking their problem down into solvable subproblems using Top Down Design
  • Develop abstractions to manage the complexity of their program (write several reusable functions that solve small subproblems)
Description

In this lesson, students learn how they can allow users to input information into their programs, and use that input accordingly.

Objective

Students will be able to:

  • Create programs that ask the user for input
  • Store user input in variables and print it back to the user
  • Choose the proper input function to use depending on the type of information needed
Description

In this lesson, students will expand their use of functions by learning about and implementing parameters.

Objective

Students will be able to:

  • Explain the use of parameters and arguments
  • Create functions that take in parameters as input
  • Use parameters to generalize functions and reduce repeated code
Description

In this lesson, students will define and call their own functions in Roblox Studio. These functions will take in multiple parameters as input and produce an output (generate a part).

Objective

Students will be able to:

  • Define a functions that use multiple parameters
  • Use a function to generate parts in Roblox Studio
Description

In this lesson, students learn about return statements and how to use them to send information between functions.

Objective

Students will be able to:

  • Explain the purpose of returning a value from a function
  • Create functions that return values
  • Create programs that call functions with return values and store the result for later use
Description

In this lesson, students work with and define functions with return values in Roblox Studio.

Objective

Students will be able to:

  • Create functions that return values in Roblox Studio
  • Create programs that call functions with return values and use the return values to solve a higher-order problem
Description

In this lesson, students review content with a multiple-choice unit quiz.

Objective

Students will be able to:

  • Prove their knowledge of basic coding concepts through a multiple-choice quiz
Description

In this practice performance task, students will create a scavenger hunt in Roblox!

Objective

Students will be able to:

  • Develop algorithms and implement them using Roblox’s library of commands and conditions
  • Collaborate in the development of programs
  • Make a plan for their solution by breaking their problem down into solvable subproblems using Top Down Design
  • Develop abstractions to manage the complexity of their program (write several reusable functions that solve small subproblems)
Description

In this lesson, students will be introduced to arrays and how to use them to create ordered collections of items within their programs.

Objective

Students will be able to:

  • Define an array
  • Access elements of an array with an index
Description

In this lesson, students will learn how to add and remove elements at the end of an array using the insert and remove methods.

Objective

Students will be able to:

  • Add elements at the end of an array using the insert method
  • Remove elements from the end of an array using the remove method
Description

In this lesson, students will learn how to loop through an array to have more functionality with arrays in their programs.

Objective

Students will be able to:

  • Determine the length of an array using the length property
  • Use the length of an array and a for loop to loop through the elements in an array
Description

In this lesson, students will learn how to find specific elements while looping through an array.

Objective

Students will be able to:

  • Use the length of an array and a for loop to loop through the elements in an array
  • Loop over an array to filter or print certain elements based on tested criteria
Description

In this lesson, students will take what they’ve learned about arrays and apply it in Roblox.

Objective

Students will be able to:

  • Use arrays in Roblox programs
  • Loop through folders using the GetChildren() command in Roblox
Description

In this lesson, students learn what simulations are and how they are used. Students will explore simulations such as Conway’s Game of Life and Wolf Sheep Predation.

Objective

Students will be able to:

  • Explain how computers can be used to represent real-world phenomena or outcomes
  • Compare simulations with real-world contexts
Description

In this lesson, students review content with a multiple-choice unit quiz.

Objective

Students will be able to:

  • Prove their knowledge of basic coding concepts through a multiple-choice quiz
Description

How do computers store and manipulate information? In this lesson, students learn how computers abstract complicated information into manageable chunks that they can then store and manipulate.

Objective

Students will be able to:

  • Explore and explain abstraction and the different ways that we can represent digital information.
Description

In this lesson, students will learn what a number system is, the difference between the decimal number system and the binary number system, and how to convert between decimal and binary.

Objective

Students will be able to:

  • Represent numbers in different number systems
  • Understand how to convert between the decimal and binary system
Description

In this lesson, students will learn what a number system is, the difference between the decimal number system and the binary number system, and how to convert between decimal and binary.

Objective

Students will be able to :

  • Understand the binary system
  • Encode various types of information using binary
Description

In this lesson, students will learn how computers break down images into concrete values that can be stored. Students will learn how images are represented digitally using pixels.

Objective

Students will be able to:

  • Understand how images can be encoded as data
Description

In this lesson, students will learn how the RGB encoding scheme allows us to encode colors as numeric data. It defines the amount of red, green and blue light in a pixel.

Objective

Students will be able to:

  • Encode colors
  • Encode color images as data
Description

In this lesson, students will learn how computers shrink digital information, to make storage of pictures, videos, and text more efficient.

Objective

Students will be able to:

  • Understand how data can be compressed.
Description

In this lesson, students will what lossy compression is, the benefits and disadvantages of using this kind of compression, and where using lossy compression is appropriate.

Objective

Students will be able to:

  • Understand different types of compressions and the benefits and drawbacks of each.
Description

In this lesson, students learn how computers encrypt and decrypt information. Students learn the difference between asymmetric and symmetric encryption.

Objective

Students will be able to:

  • Explain what cryptography is and how it is used
  • Analyze an encryption and determine if it is weak or strong
  • Explain the difference between an easy and hard problem in computer science
  • Explain the difference between algorithms that run in a reasonable amount of time and those that do not run in a reasonable amount of time
  • Explain the difference between solvable and unsolvable problems in computer science
  • Explain the existence of undecidable problems in computer science
Description

This lesson is a summative assessment of the unit’s learning objectives.

Objective

Assess student achievement of the learning goals of the unit

Description

In this practice performance task, students will create two custom color filters in Roblox studio. The player will be able to apply a color filter to a “pixel image” by pressing the button for that filter.

Objective

Students will be able to:

  • Develop algorithms and implement them using Roblox’s library of commands and conditions
  • Collaborate in the development of programs
  • Make a plan for their solution by breaking their problem down into solvable subproblems using Top Down Design
  • Develop abstractions to manage the complexity of their program (write several reusable functions that solve small subproblems)
  • Utilize data structures to manage the complexity of their program.
Description

In this practice performance task, students will learn about steganography and how it is used to encrypt data. Students will develop their own encryption algorithm to hide a message in a collection of Roblox parts by manipulating the parts’ hexadecimal color codes.

Objective

Students will be able to:

  • Develop algorithms and implement them using Roblox’s library of commands and conditions
  • Collaborate in the development of programs
  • Make a plan for their solution by breaking their problem down into solvable subproblems using Top Down Design
  • Develop abstractions to manage the complexity of their program (write several reusable functions that solve small subproblems)
  • Utilize data structures to manage the complexity of their program.
Description

In this lesson, students will have a high-level discussion about what the internet is and how the internet works. The topics of anonymity and censorship will also be discussed.

Objective

Students will be able to:

  • Understand what the internet is
  • Understand how the internet works
  • Discuss the issue of anonymity
  • Understand the legal and ethical concerns surrounding internet censorship
Description

In this lesson, we explore the hardware that makes up the internet and explore characteristics of that hardware that define our experience on the internet.

Objective

Students will be able to:

  • Discuss and answer questions about the hardware that powers the internet
Description

In this lesson, students will explore how internet hardware communicates using Internet Addresses and the Internet Protocol.

Objective

Students will be able to:

  • Discuss the necessity of internet protocols
  • Recognize the hierarchy of elements in an IP address
Description

In this lesson, students learn what a URL is and what happens when they visit a URL.

Objective

Students will be able to:

  • Describe the process that occurs when typing in a URL, from sending a request and response over the Internet to viewing a webpage
Description

In this lesson, students will explore the DNS system and how it maps human readable domain names into actual accessible IP addresses.

Objective

Students will be able to:

  • Understand the DNS system and how it works
  • Recognize the DNS system as an abstraction
Description

In this lesson, students explore how messages get from one address on the internet to another.

Objective

Students will be able to:

  • Explain how computers communicate using routers
  • Explain what considerations are made when choosing a route
  • Discuss how routers are fault-tolerant because of redundancy
Description

In this lesson, students learn about the last piece of the puzzle for how the Internet works: Packets and Protocols. All information sent over the internet is broken down into small groups of bits called packets. The format for creating and reading packets is defined by open protocols so that all devices can read packets from all other devices.

Objective

Students will be able to:

  • Explain the packet process and how protocols (TCP/IP and HTTP) are vital to the exchange of information on the Internet
  • Explain the HyperText Transfer Protocol
Description

In this lesson, students will discuss the ways that the protocols that we have discussed can be exploited, and some methods of protection that we have. We learn about the impact of cybercrime and how we can combat cyber attacks with cybersecurity. Cryptography is the cornerstone of secure communication.

Objective

Students will have an understanding of why cybersecurity is necessary, and some practical measures that they can take themselves to improve their security on the internet.

Description

In this lesson, students are presented with different ways that the Internet impacts their lives. The Internet affects the way that people communicate (emails, social media, video chat) and collaborate to solve problems. It has revolutionized the way that people can learn and even buy things. Because the Internet is present in almost every facet of people’s lives, there are severe ethical and legal concerns that derive from the Internet.

Objective

Students will be able to:

  • Analyze the different ways that the Internet impacts their lives by learning about how the Internet contributes to collaboration, communication, etc
  • Evaluate whether the Internet has a more positive or negative effect on their community by citing examples from the lesson
  • Explain what the digital divide is and articulate their own opinions related to it
Description

In this lesson, students will learn what copyright laws are and how to avoid copyright infringement. They will explore why copyright laws are important and how they protect the creators.

Objective

Students will be able to:

  • Explain what copyright laws are and why they are important
  • Find images they are legally allowed to use in their projects
  • Accurately attribute images they find and want to use
Description

This lesson is a summative assessment of the unit’s learning objectives.

Objective

Assess student achievement of the learning goals of the unit

Description

In this Practice Performance Task students will choose an innovation that was enabled by the Internet and explore the positive and negative impacts of their innovation on society, economy, and culture. Students will develop a computational artifact that illustrates, represents, or explains the innovation’s purpose, its function, or its effect, and embed this artifact in their personal portfolio website.

Objective

Students will be able to…

  • Communicate the beneficial and harmful effects of a computing innovation
  • Develop a computational artifact to represent a computing innovation of choice
  • Cite relevant and credible sources in their arguments
  • Gain practice for the AP Explore Performance Task

Enduring Understandings

This lesson builds toward the following Enduring Understandings (EUs) and Learning Objectives (LOs). Students should understand that…

  • EU 1.1 Creative development can be an essential process for creating computational artifacts. (LO 1.1.1)
  • EU 1.2 Computing enables people to use creative development processes to create computational artifacts for creative expression or to solve a problem. (LOs 1.2.1, 1.2.2)
  • EU 6.1 The Internet is a network of autonomous systems. (LO 6.1.1)
  • EU 7.1 Computing enhances communication, interaction, and cognition. (LO 7.1.1)
  • EU 7.5 An investigative process is aided by effective organization and selection of resources. Appropriate technologies and tools facilitate the accessing of information and enable the ability to evaluate the credibility of sources. (LOs 7.5.1, 7.5.2)
Description

In this lesson, students will learn how computers are used to collect, store, manipulate, and visualize data in order to answer questions and gain knowledge of the world.

Objective

Students will be able to examine and analyze the growing importance of data in technology and their lives

Enduring Understandings

This lesson builds toward the following Enduring Understandings (EUs) and Learning Objectives (LOs). Students should understand that…

  • EU 3.1 People use computer programs to process information to gain insight and knowledge. (LO 3.1.1)
  • EU 3.2 Computing facilitates exploration and the discovery of connections in information. (LOs 3.2.1, 3.2.2)
Description

In this lesson, students will learn about the impact of visually representing data to make information easier to analyze and use.

Objective

Students will be able to:

  • Explain the importance of visually depicting data to make information easier to use and to understand trends and changes in information
Description

In this lesson, students learn how computers can be used to collect and store data. They learn best practices for interpreting data that is presented. Data visualizations can be very helpful in recognizing patterns and answering questions, but can also be used to mislead if skewed or full of bias.

Objective

Students will be able to:

  • Understand how computers collect and store data
  • Analyze data interpretation by learning ways in which data can be skewed
  • How to think meta-cognitively about the data being represented
Description

Students will work with a partner to answer a question of personal interest using a publicly available data set. Students will need to produce data visualizations and explain how these visualizations led to their conclusions. They will develop a computational artifact that illustrates, represents, or explains their findings, communicate their findings to their classmates, and embed their artifact in their personal portfolio website.

Objective

Students will collaborate to process data and gain knowledge about a question of interest to them, and present their data driven insight to their classmates

Enduring Understandings

This lesson builds toward the following Enduring Understandings (EUs) and Learning Objectives (LOs). Students should understand that…

  • EU 1.1 Creative development can be an essential process for creating computational artifacts. (LO 1.1.1)
  • EU 1.2 Computing enables people to use creative development processes to create computational artifacts for creative expression or to solve a problem. (LOs 1.2.1, 1.2.2, 1.2.4)
  • EU 3.1 People use computer programs to process information to gain insight and knowledge. (LOs 3.1.2, 3.1.3)
  • EU 3.2 Computing facilitates exploration and the discovery of connections in information. (LO 3.2.1)
  • EU 7.1 Computing enhances communication, interaction, and cognition. (LO 7.1.1)
Description

In this lesson, students will receive an introduction to the Create Performance Task and the AP Computer Science Principles Exam. They will focus on understanding components A, B, and C of the Create Performance Task by reading the initial five pages of the Student Handouts. Through guided discussion, students will have the opportunity to address any questions they may have regarding the task requirements.

Objective

Students will be able to:

  • Identify and explain components A, B, and C of the Create Performance Task in AP Computer Science Principles.
  • Analyze task requirements and generate thoughtful questions to clarify doubts and deepen understanding.
  • Actively engage in group discussions, share questions, and collaborate with peers to gain a comprehensive understanding of the task and exam.
Description

This lesson covers guidelines for the Create Performance Task, the Academic Integrity Policy, and strategies for students to prepare and navigate the task ethically.

Objective

Students will be able to:

  • Understand and apply the guidelines for the Create Performance Task.
  • Comprehend the Academic Integrity and Plagiarism Policy, incorporating external ideas ethically and providing proper attribution.
  • Develop effective strategies for preparation and ethical navigation of the Create Performance Task.
Description

This lesson is a practice exam that prepares students for the AP Computer Science Principles exam in May. Like the AP Exam, this lesson consists of a multiple choice test that assesses the learning objectives of the course.

Objective

Students will be able to…

  • Explain the format of the AP Computer Science Principles exam
  • Identify course topics that they have a strong understanding of
  • Identify course topics that they need to review
Description

In this lesson, students are introduced to the concept of design thinking and learn the steps in the design cycle.

Objective

Students will be able to:

  • Define design thinking
  • Name the steps in the design cycle
Description

In this lesson, students will be introduced to prototyping. They will be given guidelines for this step and shown examples in order to successfully create prototypes of their own final project ideas.

Objective

Students will be able to:

  • Explain what prototyping is and why it is an important part of the design process
Description

In this lesson, students will explore the testing step of the design process. They will see good and bad examples of testing practices and will be able to get feedback on their own prototypes before moving into the building process.

Objective

Students will be able to:

  • Describe why testing is an important part of the design process
  • Explore good and bad testing practices in order to receive helpful feedback on their final project ideas
Description

In this final programming module, students will put together all of the concepts learned throughout the course to create a Roblox experience. They will work with partners or in groups to creatively develop a website that includes aspects from each part of the course.

Objective

Students will be able to:

  • Connect all they’ve learned to create a final Roblox experience
  • Work in pairs or groups to create a product