Please enable JavaScript to use CodeHS


World of Computing

Lessons

  1. Introduction to Programming with Karel the Dog

    1. 1.1 Introduction to Programming With Karel

    2. Description

      In this lesson, students are introduced to Karel the Dog and how Karel can be given a set of instructions to perform a simple task.

    3. Objective

      Students will be able to:

      • Recognize, explain, and use the commands that Karel can be given. These commands are: move(), putBall(), takeBall() and turnLeft().
    4. 1.2 More Basic Karel

    5. Description

      In this lesson, students build on their understanding of how Karel the Dog can be given a set of instructions to perform a simple task.

    6. Objective

      Students will be able to:

      • Recognize, explain, and use the commands that Karel can be given
      • Debug and rework their code as well as someone else’s code
    7. 1.3 Karel Can't Turn Right

    8. Description

      In this lesson, students are introduced to functions through the lens of teaching Karel a new trick - how to turn right! Students will learn how to define and call a function that teaches Karel how to turnRight.

    9. Objective

      Students will be able to:

      • Define and call functions
    10. 1.4 Functions in Karel

    11. Description

      In this lesson, functions will be used to teach Karel a new word or command. Using functions allows programs to be broken down into smaller pieces and makes it easier to understand.

    12. Objective

      Students will be able to:

      • Understand what functions are, how they are used and how using them improves programs
      • Design and implement their own functions to solve problems
    13. 1.5 The Start Function

    14. Description

      In this lesson, students will learn the importance of writing readable code and how using the start function can help achieve this.

    15. Objective

      Students will be able to:

      • Explain the importance of writing readable code
      • Analyze and compare the readability of different programs
      • Use the start function to make their programs more readable
    16. 1.6 Top Down Design and Decomposition in Karel

    17. Description

      In this lesson, students learn top down design and decomposition as the processes of breaking big problems into smaller, manageable pieces. The functions improve the readability of the code and avoid repeated code.

    18. Objective

      Students will be able to:

      • Break a large problem down into smaller, simpler problems
      • Write functions that solve the simpler problems, and use them as building blocks to solve the larger problem
      • Compare programs and identify good vs. poor decomposition
    19. 1.7 Commenting Your Code

    20. Description

      In this lesson, students will learn how to utilize comments in their code to explain what their code is doing. Comments should include preconditions and postconditions. Preconditions are assumptions we make about what is true before a function is called in our program. Postconditions are what should be true after a function is called in our program.

    21. Objective

      Students will be able to:

      • Explain the preconditions and postconditions of a function
      • Create clear and readable comments in their code that help the reader understand the code
      • Explain the purpose of comments
    22. 1.8 Super Karel

    23. Description

      In this lesson, students will be introduced to SuperKarel. SuperKarel includes commands like turnRight() and turnAround() since they are so commonly used. These commands come prepackaged with the SuperKarel library (API).

    24. Objective

      Students will be able to:

      • Write programs that use SuperKarel instead of Karel
      • Utilize the new toolbox of commands that SuperKarel provides over Karel
    25. 1.9 For Loops

    26. Description

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

      A for loops is written as follows:

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

      Students will be able to:

      • Create for loops to repeat code a fixed number of times
      • Explain when a for loop would be a useful tool
      • Utilize for loops to write programs that would be difficult/impossible without loops
    28. 1.10 If Statements

    29. Description
      • A condition is a function that returns a true/false answer.
      • JavaScript uses if statements as a way to make decisions and execute specific code. If statements are helpful in writing code that can be used in different situations.
    30. 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 to only execute code if a certain condition is true

    31. 1.11 If/Else Statements

    32. Description

      If and if/else statements allow Karel to handle different types of worlds and allow us to solve more general problems.

    33. 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 an If/Else statement is appropriate to be used
    34. 1.12 While Loops in Karel

    35. Description

      While loops allow us to repeat a section of code as long some condition is true.

    36. 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

    37. 1.13 Control Structures Example

    38. Description

      In this lesson, students take a look at all of the control structures. Control structures can be selective, like if and if / else statements and are based on a condition. Other control structures are iterative and allow for repeated code like for loops and while loops. Basically, control structures control the way the commands execute.

    39. Objective

      Students will be able to:

      • Identify the different control structures that can be used to modify the flow of control through a program
      • Combine control structures to solve complicated problems
      • Choose the proper control structure for a given problem
    40. 1.14 More Karel Examples and Testing

    41. Description

      In this lesson, students will test their knowledge of control structures in preparation for the upcoming Karel challenges. Control structures (like loops and if statements) are useful in building programs that can be applied in various Karel worlds.

    42. Objective

      Students will be able to:

      • Analyze a solution to a problem and explain why it works
      • Use control structures to create general solutions that work on all Karel worlds
    43. 1.15 How to Indent Your Code

    44. Description

      In this lesson, students will learn the proper way to indent their code. Indentation is especially important when using multiple loops, functions, and if statements to show the structure of the code. Indentation provides a good visual approach to see which commands are inside vs. outside of a loop or if statement.

    45. Objective

      Students will be able to:

      • Explain why it is important to indent code
      • Identify proper indentation
      • Modify a program to have proper indentation
      • Write programs with proper indentation
    46. 1.16 Karel Challenges

    47. Description

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

    48. 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
    49. 1.17 Intro to Programming with Karel the Dog Quiz

    50. Description
    51. Objective
  2. What is Computing?

    1. 2.1 History of Computers

    2. Description

      When was the first computer made? What did it look like, and what was it used for? In this lesson, students will explore the creation and evolution of computing machines that now permeate our day-to-day life.

      Note: This course was updated on October 7, 2020. You can find the original material in the Supplemental Module titled “Original Material: What is Computing?”

    3. Objective

      Students will be able to:

      • Identify important historical events in the development of modern computers
      • Explore individual’s contributions to the development of the computer and discuss who gets to be included in the computer innovators group
    4. 2.2 Computer Organization

    5. Description

      How are computers organized? What are the main components of a computer?

      In this lesson, we will explore how different organizational structures of computers interact with each other to make computers functional.

    6. Objective

      Students will be able to:

      • Understand the main parts of a computer
      • Differentiate the difference between hardware and software
      • Identify input and output devices
      • Learn different types of networks
    7. 2.3 Software

    8. Description

      What kinds of software do computers use and need?

      In this lesson, the topic of software is broken down into types of software, how they interact, and the specific functions of the different types of software.

    9. Objective

      Students will be able to:

      • Understand and identify different types of software and their functions
    10. 2.4 Hardware

    11. Description

      What is hardware? How does hardware work?

      In this lesson, hardware is broken down into the different physical components of computers and how they contribute to the function of the computer as a whole.

    12. Objective

      Students will be able to:

      • Understand and identify the physical components of a computer & their roles in computer functionality
    13. 2.5 Future of Computing

    14. Description

      Where is computing headed? What is Artificial Intelligence and what are the potential impacts that this might have on our world?

      In this lesson, students learn about Artificial Intelligence and how the landscape of computing might change in the future. Students will discuss how these future developments might impact our society.

    15. Objective

      Students will be able to:

      • Discuss the future of technology and computers in the world
    16. 2.6 Computer Model

    17. Description

      For the final project, students will create a short presentation about a specific model of computer. It could be an early computer model, or a computer model that is still being developed. They may pick any technology where a computer is the main component ? this includes phones, robots, drones, etc.

    18. Objective

      Students will be able to create and present on a specific model of computer using any technology where a computer is the main component (phone, robots, drone, etc).

    19. 2.7 What is Computing? Quiz

    20. Description
    21. Objective
  3. Introduction to Programming with Karel the Dog

    1. 3.1 Introduction to Programming With Karel

    2. Description

      Students are introduced to CodeHS and how Karel the Dog can be given a set of instructions to perform a simple task.

    3. Objective

      Introduce students to Karel and explain the commands she can be given.

    4. 3.2 More Basic Karel

    5. Description

      Students will learn about Karel’s ‘World’ and the ways that Karel can interact with it.

    6. Objective

      To introduce students to Karel’s world and more of the commands that we can teach Karel

    7. 3.3 Karel Can't Turn Right

    8. Description

      Karel can learn new words or commands through the use of functions. This is called defining a functions. Defining functions has syntax rules.

    9. Objective

      Use Karel and commands to introduce students to functions.

    10. 3.4 Functions in Karel

    11. Description

      Functions are used to teach Karel a word or command. Using functions allow us to break down our program into smaller pieces and make it easier to understand.

    12. Objective

      Help students understand what functions are for and how using them improves programs.

    13. 3.5 The Start Function

    14. Description

      All programs start by ?calling? the start function.

    15. Objective

      Students gain a deeper understanding of functions. Students can explain the importance of writing readable code, and can analyze and compare the readability of different programs. Students can use the start function to make their programs more readable.

    16. 3.6 Top Down Design and Decomposition in Karel

    17. Description

      Top down design and Decomposition are the processes of breaking down a program into functions into smaller parts to avoid repeated code and make our program more readable.

    18. Objective

      Students will be able to…
      * Break a large problem down into smaller pieces
      * Write methods to solve each smaller problem
      * Solve a complicated problem using Top Down Design
      * Identify good and poor decomposition

    19. 3.7 Commenting Your Code

    20. Description

      Comments give notes to the reader to explain what your code is doing. Two types of comments that can utilized are preconditions and postconditions. Preconditions are assumptions we make about what is true before a function is called in our program. Postconditions are what should be true after a function is called in our program.

    21. Objective

      Students will be able to…
      * Explain the preconditions and postconditions of a function
      * Create clear and readable comments in their code that help the reader understand the code
      * Explain the purpose of comments

    22. 3.8 Super Karel

    23. Description

      Introducing Super Karel! Since commands like turnRight() and turnAround() are so commonly used, we shouldn’t have to define them in every single program. They should come prepackaged with the Karel library. This is where SuperKarel comes in. SuperKarel is just like Karel, except SuperKarel already knows how to turnRight and turnAround, so we don’t have to define those methods ourselves anymore.

    24. Objective

      Students will be able to…
      * Write programs that use SuperKarel instead of Karel
      * Utilize the new toolbox of commands that SuperKarel provides over Karel
      * Read documentation to understand how to use a library (SuperKarel is an example of this)

    25. 3.9 For Loops

    26. Description

      This lesson teaches students how to use for loops in their programs. The for loop allows you to repeat a specific part of code a fixed number of times.

      We write for loops like this:

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

      Students will be able to…
      * Create for loops to repeat code a fixed number of times
      * Explain when a for loop would be a useful tool
      * Utilize for loops to write programs that would be difficult / impossible without loops

    28. 3.10 If Statements

    29. Description
      • A condition is a function that returns a true/false answer.
      • JavaScript uses if statements as a way to make decisions and execute specific code. If statements are helpful in writing code that can be used in different situations.
    30. 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 to only execute code if a certain condition is true

    31. 3.11 If/Else Statements

    32. Description

      In this lesson we take a look at more conditional statements, more specifically if/else statements. If/else statements let us do one thing if a condition is true, and something else otherwise.

      We write if/else statements like this:

      if(frontIsClear()) {
          // code to execute if front is clear
      } else {
          // code to execute otherwise
      }
      
    33. 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 an If/Else statement is appropriate to be used

    34. 3.12 While Loops in Karel

    35. Description

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

    36. 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

    37. 3.13 Control Structures Example

    38. Description

      In this lesson we take a look at control structures. Some control structures allow us to ask questions: if, if / else statements. Other control structures allow us to repeat code like for loops and while loops. Basically, control structures allow us to control the way the commands execute.

    39. Objective

      Students will be able to…
      * Identify the different control structures we can use to modify the flow of control through a program
      * Combine control structures to solve complicated problems
      * Choose the proper control structure for a given problem

    40. 3.14 More Karel Examples and Testing

    41. Description

      Control structures (like loops and if statements) are useful in building programs that can be applied in various Karel worlds. This lesson is designed to test students? knowledge of control structures in preparation for the upcoming Karel challenges.

    42. Objective

      Students will be able to…
      * Analyze a solution to a problem and explain why it works
      * Use control structures to create general solutions that work on all Karel worlds

    43. 3.15 How to Indent Your Code

    44. Description

      Indentation is especially important when using multiple loops, functions, and if statements to show the structure of the code. The indentation gives you a good visual way to see what commands are inside vs. outside of a loop or if statement.

    45. Objective

      Students will be able to…
      * Explain why it is important to indent code
      * Identify proper indentation
      * Modify a program to have proper indentation
      * Write programs with proper indentation

    46. 3.16 Ultra Karel

    47. Description
    48. Objective
    49. 3.17 Karel Challenges

    50. Description

      It’s time to put it all together! Students have learned all of Karel’s abilities, and have practiced writing programs to solve Karel problems. In this lesson, students will synthesize all of the skills and concepts learned in the Karel unit to solve increasingly challenging Karel puzzles.

    51. 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

    52. 3.18 Final Project

    53. Description

      In this unit, you’ll get to combine all of the new skills you’ve learned to create your own project from scratch!

    54. Objective

      Students will synthesize concepts and skills learned in the course to create their own final project.
      Students will scope their project (eliminate features that aren’t necessary) so that it fits in the timeframe allotted.
      Students will present their project to their classmates and talk about how the project was developed.

    55. 3.19 Intro to Programming with Karel the Dog Quiz

    56. Description
    57. Objective
  4. What is Computing? Original Material

    1. 4.1 History of Computers

    2. Description
    3. Objective
  5. New Material (2020-2021)

    1. 5.1 History of Computers

    2. Description

      When was the first computer made? What did it look like, and what was it used for? In this lesson, students will explore the creation and evolution of computing machines that now permeate our day-to-day life.

      Note: This course was updated on October 7, 2020. You can find the original material in the Supplemental Module titled “Original Material: What is Computing?”

    3. Objective

      Students will be able to:

      • Identify important historical events in the development of modern computers
      • Explore individual’s contributions to the development of the computer and discuss who gets to be included in the computer innovators group