Please enable JavaScript to use CodeHS

West Virginia Discovering Computer Science

Description

In this lesson, students will be introduced to Karel the dog and commands Karel uses to navigate and interact with Karel’s world. This introductory lesson can be used as a review of concepts introduced in Karel Adventures modules.

Objective

Students will be able to:

  • Identify basic syntax used in JavaScript and Karel programs
  • Use basic commands to train or program Karel the dog
  • Debug basic code by identifying common syntax errors
Description

In this lesson, students learn more about Karel and Karel’s world. Students learn about walls/shelves in Karel’s world, the directions Karel can face, and how to identify a location in Karel’s world using rows and columns. Students will also begin solving more difficult Karel problems and situations.

Objective

Students will be able to…

  • Identify the direction that Karel is facing
  • Predict what direction Karel will be facing after executing a series of commands
  • Create basic programs to solve situations or problems in Karel’s world
Description

In this lesson, students will learn how they can create their own commands for Karel by calling and defining functions. Functions allow programmers to create and reuse new commands that make code more readable and scalable.

Objective

Students will be able to:

  • Define a function, and successfully implement functions in their code.
  • Create functions to teach Karel new commands
Description

In this lesson, students learn in more detail about functions and how to use functions to break down their programs into smaller pieces. Students will also learn about using the main function and commenting code to make it easier to understand.

Objective

Students will be able to:

  • Explain the difference between defining and calling a function
  • Utilize functions to write higher level Karel programs
  • Break a large problem down into smaller, simpler problems
  • Create clear and readable comments in their code that help the reader understand the code
Description

In this lesson, students learn how to use for loops in their programs. The for loop allows students to repeat a specific part of code a fixed number of times.

For loops are written like this:

for(let i = 0; i < 4; i++)
{
    // Code to be repeated 4 times
}
Objective

Students will be able to:

  • Create for loops to repeat code a fixed number of times
  • Explain when a for loop should be a used
  • Utilize for loops to write programs that would be difficult / impossible without loops
Description

In this lesson, students learn about the conditional statement “if”. Code within an “if statement” will only execute IF the condition is true.

if (frontIsClear()) {
    // Code to be executed only if front is clear
}
Objective

Students will be able to:

  • Use conditions to gather information about Karel’s world (is the front clear, is Karel facing north, etc)
  • Create if statements that only execute code if a certain condition is true
Description

In this lesson, students learn about an additional control structure, if/else statements. If/else statements let students do one thing if a condition is true, and something else otherwise.

if/else statements are written like this:

if (frontIsClear()) {
      // code to execute if front is clear
 } else {
      // code to execute otherwise
}
Objective

Students will be able to:

  • Explain the purpose of an If/Else statement
  • Create If/Else statements to solve new types of problems
  • Identify when it is appropriate to use an If/Else statement
Description

In this lesson, students are introduced a new type of loop: while loops. While loops allow Karel to repeat code while a certain condition is true. While loops allow students to create general solutions to problems that will work on multiple Karel worlds, rather than just one.

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
  • Test their solutions on different Karel worlds
Description

In this lesson, students will synthesize all of the skills and concepts learned in the Karel module to solve increasingly challenging Karel puzzles.

Objective

Students will be able to:

  • Define a problem in their own words and plan out a solution to the problem
  • Break a large problem down into smaller pieces and solve each of the pieces, then use these solutions as building blocks to solve the larger problem
  • Utilize the proper control structures to create general solutions that solve multiple Karel worlds
  • Write clear and readable code using control structures, functions, decomposition, and comments
Description

In this lesson, students review the module’s content with a 15 question Unit Quiz.

Objective

Students will be able to:

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

In this lesson, students will learn about the history of computers and how people have interacted with them over the decades.

Objective

Students will be able to:

  • Describe the evolution of computers and how people have interacted with them.
  • Analyze the impact of computers on everyday life.
Description

In this lesson, students learn about different types of software, including operating systems and applications. They will also explore the process used to create an application.

Objective

Students will be able to:

  • Explain the differences between operating systems and applications.
  • Describe the development process for creating an application.
Description

In this lesson, students will learn about different computer components and how they impact a computer system. They will then apply this to troubleshooting common computer issues.

Objective

Students will be able to:

  • Identify the different hardware components of a computer system and explain their function.
  • Analyze and troubleshoot common computer issues.
Description

In this lesson, students learn about three methods computers use to process tasks — sequential, parallel, and distributed computing — as well as a few different searching algorithms.

Objective

Students will be able to:

  • differentiate between sequential, parallel, and distributed computing
  • explain the benefits and challenges of using parallel and distributed computing
  • understand the differences between Random, Linear, and Binary searches
Description

In this lesson, students will learn what cloud computing is and compare and contrast it to physical computing.

Objective

Students will be able to:

  • Explain the concept of cloud computing and its benefits.
  • Compare and contrast cloud computing with physical computing.
Description

In this lesson, students will learn about how the Internet of Things devices are all around us and how to manage privacy concerns related to these devices.

Objective

Students will be able to:

  • Identify various examples of internet of things devices and how you interact with them daily.
  • Explain the importance of data privacy when using internet of things devices.
Description

In this lesson, students will learn about ethical and legal considerations in computing and how these can create bias.

Objective

Students will be able to:

  • Explain how bias can be prevented or minimized in computing.
  • Identify ethical and legal considerations when using computing technologies.
Description

In this lesson, students will learn about where computing is going (including the impact of AI) and the roles that they can play in that future.

Objective

Students will be able to:

  • Understand the current and future trends in the computer industry.
  • Examine the various roles and opportunities that students will have in the computing industry
Description

In this lesson, students will design a computer to meet the needs of the future and also review others’ designs to assess how well they will meet these future needs.

Objective

Students will be able to:

  • Identify and evaluate the components that are necessary for a computer to meet the needs of the future
  • Design and create a computer that meets the needs of the future
  • Critique and evaluate other designs of computers to assess how well they will meet the needs of the future.
Description

In this lesson, students will demonstrate what they learned in the unit be completing a summative exam.

Objective

Students will be able to:

  • Prove their knowledge of Computers, past, present, and future, through a multiple-choice quiz
Description

In this lesson, students explore the value of simulations in science, learn their first JavaScript concepts, and start to build their gravity simulation.

Objective

Students will be able to:

  • Explain how simulations can be used in science, as well as their pros and cons.
  • Understand the basic idea of functions and variables in JavaScript.
  • Write their first functions and variables in JavaScript.
Description

In this lesson, students will be introduced to the basic concepts and components of the internet, including its history and the meaning of protocols. Students will discuss internet innovations and reflect on how the internet is used in their everyday lives.

Objective

Students will be able to:

  • Understand the basic concepts of the internet
  • Understand networks and how they are connected
  • Understand that a protocol is an agreed-upon method of communication
Description

In this lesson, students will explore the importance of protocols and relate how they use them in their lives.

Objective

Students will be able to:

  • Discuss the necessity of protocols
  • Explain how protocols help with communication
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.

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 is meant by cybersecurity and explore a few news worthy cyber attacks. They will also discuss the Internet of Things and the increase in connected devices.

Cybersecurity is the protection of computer systems, networks, and data from digital attacks. Increased connectivity via the Internet of Things and reliance on computer devices to send and store data makes users more vulnerable to cyber attacks.

Objective

Students will be able to:

  • Define cybersecurity and its impact
  • Determine the types of personal information and digital resources that need to be protected
  • Describe trade-offs of implementing specific security safeguards
  • Describe how the Internet of Things makes people more vulnerable to cyber attacks
Description

In this lesson, students will learn about The CIA Triad. The CIA Triad is a widely-accepted security measure that should be guaranteed in every secure system. It stands for Confidentiality, Integrity, and Availability.

  • Confidentiality is the protection of information from people who are not authorized to view it.
  • Integrity aims at ensuring that information is protected from unauthorized or unintentional alteration.
  • Availability is the assurance that systems and data are accessible by authorized users when and where needed.
Objective

Students will be able to:

  • Identify what the CIA triad is and how it relates to cybersecurity
  • Identify which part of the CIA triad has been broken in a given scenario
Description

In this lesson, students will learn how basic encryption and decryption works. There is a need for secrecy when sending and receiving personal information. Encryption and decryption are used to protect personal information.

Objective

Students will be able to:

  • Explain the need for encryption and how basic encryption and decryption works
  • Relate encryption with how it affects the CIA Triad
  • Describe the limitations of cryptographic methods.
Description

In this project, 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 an image by manipulating the hexadecimal color codes of an image.

Objective

Students will be able to:

  • Define steganography and explain how it is used in cryptography
  • Use steganography to encrypt a message in an image by manipulating the hexadecimal color code of pixels
Description

In this lesson, students complete a summative assessment of the module’s learning objectives.

Description

In this lesson, students learn how to create a canvas inside of the setup() function and learn its coordinate system. Students will also learn how to draw basic shapes in the draw() function loop.

Objective

Students will be able to:

  • Bridge connections between computation and creative expression
  • Explore the p5.js reference guide and example projects
  • Understand the HTML5 canvas and coordinate system
  • Differentiate the function of setup() and draw()
  • Set the size of the canvas: createCanvas()
  • Use p5 shape-drawing functions for primitive shapes (ellipse, rect, line)
  • Call and pass parameters to functions
Description

In this lesson, students customize the background color, fill color, and stoke color using string, greyscale, and RGB color values. Using their own and provided color palettes, students add color to provided p5.js sketches.

Objective

Students will be able to:

  • Define terminology related to color theory
  • Set the RGB values and opacity for shapes
  • Change the color of the canvas: background()
  • Change the color of shapes: fill(), noFill(), stroke(), noStroke()
  • Use advance shape-drawing functions (triangle, quad, arc, beginShape, endShape)
Description

In this lesson, students learn to use variables to store information used to position and color p5.js sketches. Students use system variables width and height as parameters to dynamically position shapes relative to the dimensions of the canvas.

Objective

Students will be able to:

  • Utilize built-in variables, width and height, to position shapes
  • Define custom variables to reduce repetition in a program
Description

This lesson introduces students to the world of animation. Students explore the history of animation and learn how to set the frame rate to adjust the speed of an animated p5.js sketch.

Objective

Students will be able to:

  • Use the frameRate() function to change the speed of animated sketches
  • Use the frameCount system variable to draw shapes dynamically
Description

In this lesson, students create a color transition animation. Using variables, students set the initial color state, then gradually add and remove red, green, and blue values of a color, creating an animated color gradient.

Objective

Students will be able to:

  • Declare and initialize variables
  • Pass variables as arguments to p5.js drawing functions
  • Increment and decrement variables
Description

This lesson introduces students to three shape transformations — translation, rotation, and scale. Students create static and animated shape transformations in p5.js using the translate(), rotate(), and scale() functions.

Objective

Students will be able to:

  • create static and animated shape transformations
  • statically and dynamically change the origin and resulting direction of a shape using the translate() function
  • statically and dynamically rotate a shape using the rotate() function
  • statically and dynamically change the size of a shape using the scale() function
Description

In this lesson, students practice dynamically setting the x and y coordinates for shapes and incrementing and decrementing such values in order to move figures in different directions. Students animate horizontal, vertical, and diagonal motion in their p5.js sketches.

Objective

Students will be able to:

  • animate horizontal motion by incrementing and decrementing x coordinates.
  • animate vertical motion by incrementing and decrementing y coordinates.
  • animate diagonal motion.
Description

This lesson teaches students how to develop interactive sketches that respond to user input from the mouse, including mouse movement and mouse clicks.

Objective

Students will be able to:

  • use the mouseX system variable to keep track of the current horizontal position of the cursor
  • use the mouseY system variable to keep track of the current vertical position of the cursor
  • use the mouseButton system variable to check whether the mouse is left, right, or center clicked
Description

This lesson teaches students how to develop interactive sketches that respond to user input from the keyboard. Students also explore how key codes are used to represent physical keys on the keyboard and use them in their sketches.

Objective

Students will be able to:

  • use the keyIsPressed system variable to create interactive p5.js sketches that respond to any pressed key
  • use keyIsDown() function to create interactive p5.js sketches that respond to a specific key being pressed
  • Represent a physical key on the keyboard digitally using key code
  • Include text in a p5.js sketch
Description

In this project, students create a sketch of their own emoji. An emoji is a small icon used to represent an emotion, symbol, or object. These icons help us express ourselves better and more imaginatively. Students complete a project proposal to plan their sketch and then use drawing and color functions they have learned so far to create it using p5.js.

Objective

Students will be able to:

  • Plan a p5.js sketch on graph paper
  • Create a color palette of containing RGB values
  • Include two ore more shapes in a p5.js sketch
  • Use two or more colors in a p5.js sketch
  • Animate the color, transformation, and position of shapes
Description

In this lesson, students understand how they can control and protect their footprint. As students use the Internet, they are building their digital footprint. This includes social media posts, emails, picture and video uploads amongst other online activity.

Objective

Students will be able to:

  • Understand how their online activity contributes to a permanent and public digital footprint
  • Articulate their own social media guidelines to protect their digital footprint
Description

In this lesson, students will learn about and discuss cyberbullying. Cyberbullying is the use of electronic communication to harass or target someone. Cyberbullying includes sending, posting, or sharing negative, harmful, false, or mean content about someone else.

Objective

Students will be able to:

  • Understand the impact of cyberbullying, and identify unacceptable bullying behavior
  • Identify proper actions to take if they are victims of cyberbullying or if they observe someone being cyberbullied
Description

In this lesson, students will learn to recognize online predatory behavior and strategies on how to avoid and respond to it. The Internet is a great place to socialize, but it is important to be aware of risks. Common sense and following safety guidelines can help students stay safe online.

Objective

Students will be able to:

  • Identify predatory behavior and how to respond to it online
Description

In this lesson, students will discuss and examine policies regarding privacy and security. Using best practices like setting strong passwords, reading privacy policies, and using https can help in staying safe online.

Objective

Students will be able to:

  • Use best practices in personal privacy and security, including strong passwords, using https, and reading privacy policies
Description

In this lesson, students will learn about and discuss information literacy. Information literacy is having the ability to find information, evaluate information credibility, and use information effectively.

Objective

Students will be able to:

  • Effectively search for and evaluate resources
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

In this lesson, students will explore and discuss the ethics and legality around hacking. A security hacker is someone who seeks to break through defenses and exploit weaknesses in a computer system or network. There are white hat hackers, who help companies find and protect exploits in their systems, and black hat hackers who hack maliciously.

Objective

Students will be able to:

  • Identify the difference between white hat hacking and black hat hacking
  • Explain career opportunities in cybersecurity
Description

Now that students have learned about digital citizenship and cyber hygiene, they will take what they have learned and create a PSA to inform members in the community about a topic!

Objective

Students will be able to:

  • Create a public service announcement for members of their community about a topic in digital citizenship or cyber hygiene
  • Choose the technological tool(s) that are most appropriate for the task at hand
  • Work collaboratively as a group to create a final product
Description

In this lesson, students complete a summative assessment of the unit’s learning objectives.

Objective

Students will be able to:

  • Prove their knowledge of digital citizenship and cyber hygiene 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 about the hexadecimal number system, and how it is useful in storing digital information. They will also learn how to convert numbers from the hexadecimal system to binary and vice versa.

Objective

Students will be able to:

  • Understand how to convert between the hexadecimal and binary system
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 to include images in their programs and manipulate their pixels using WebImage. Students will learn how image filters manipulate stored pixel data.

Objective

Students will be able to:

  • Include images in their programs
  • Manipulate the stored pixel data arbitrarily