Please enable JavaScript to use CodeHS


AP Computer Science Principles in JavaScript

Lessons

  1. Introduction to Programming

    1. 1.1 Welcome to AP CSP

    2. Description
    3. Objective
    4. 1.2 Introduction to Programming With Karel

    5. Description
    6. Objective
    7. 1.3 More Basic Karel

    8. Description
    9. Objective
    10. 1.4 Karel Can't Turn Right

    11. Description
    12. Objective
    13. 1.5 Functions in Karel

    14. Description
    15. Objective
    16. 1.6 The Start Function

    17. Description
    18. Objective
    19. 1.7 Top Down Design and Decomposition in Karel

    20. Description
    21. Objective
    22. 1.8 Commenting Your Code

    23. Description
    24. Objective
    25. 1.9 Abstraction

    26. Description
    27. Objective
    28. 1.10 Super Karel

    29. Description
    30. Objective
    31. 1.11 For Loops

    32. Description
    33. Objective
    34. 1.12 If Statements

    35. Description
    36. Objective
    37. 1.13 If/Else Statements

    38. Description
    39. Objective
    40. 1.14 While Loops in Karel

    41. Description
    42. Objective
    43. 1.15 Control Structures Example

    44. Description
    45. Objective
    46. 1.16 Debugging Strategies

    47. Description
    48. Objective
    49. 1.17 Karel Algorithms

    50. Description
    51. Objective
    52. 1.18 How to Indent Your Code

    53. Description
    54. Objective
    55. 1.19 Ultra Karel

    56. Description
    57. Objective
    58. 1.20 Karel Challenges

    59. Description
    60. Objective
    61. 1.21 Introduction to Programming Quiz

    62. Description
    63. Objective
  2. Practice PT: Pair-Programming Paint!

    1. 2.1 Practice PT: Pair-Programming Paint!

    2. Description
    3. Objective
  3. Programming with JavaScript

    1. 3.1 What is Code

    2. Description
    3. Objective
    4. 3.2 Uses of Programs

    5. Description
    6. Objective
    7. 3.3 Hello World

    8. Description
    9. Objective
    10. 3.4 Variables

    11. Description
    12. Objective
    13. 3.5 User Input

    14. Description
    15. Objective
    16. 3.6 Basic Math in JavaScript

    17. Description
    18. Objective
    19. 3.7 Using Graphics in JavaScript

    20. Description
    21. Objective
    22. 3.8 Mouse Events: Mouse Clicked

    23. Description
    24. Objective
    25. 3.9 Programming with JavaScript Quiz

    26. Description
    27. Objective
  4. JavaScript Control Structures

    1. 4.1 Booleans

    2. Description
    3. Objective
    4. 4.2 Logical Operators

    5. Description
    6. Objective
    7. 4.3 Comparison Operators

    8. Description
    9. Objective
    10. 4.4 If Statements

    11. Description
    12. Objective
    13. 4.5 Key Events

    14. Description
    15. Objective
    16. 4.6 For Loops in JavaScript

    17. Description
    18. Objective
    19. 4.7 General For Loops

    20. Description
    21. Objective
    22. 4.8 For Loop Practice

    23. Description
    24. Objective
    25. 4.9 Random Numbers

    26. Description
    27. Objective
    28. 4.10 While Loops

    29. Description
    30. Objective
    31. 4.11 Loop and a Half

    32. Description
    33. Objective
    34. 4.12 Javascript Control Structures Quiz

    35. Description
    36. Objective
  5. Functions and Parameters

    1. 5.1 Functions and Parameters 1

    2. Description
    3. Objective
    4. 5.2 Functions and Parameters 2

    5. Description
    6. Objective
    7. 5.3 Functions and Parameters 3

    8. Description
    9. Objective
    10. 5.4 Functions and Return Values 1

    11. Description
    12. Objective
    13. 5.5 Functions and Return Values 2

    14. Description
    15. Objective
    16. 5.6 Local Variables and Scope

    17. Description
    18. Objective
    19. 5.7 JavaScript vs Karel

    20. Description
    21. Objective
    22. 5.8 Basic JavaScript and Graphics Challenges

    23. Description
    24. Objective
    25. 5.9 Functions and Parameters Quiz

    26. Description
    27. Objective
  6. Practice PT: Tell a Story

    1. 6.1 Project: Tell a Story

    2. Description
    3. Objective
  7. Basic Data Structures

    1. 7.1 Intro to Lists/Arrays

    2. Description
    3. Objective
    4. 7.2 Indexing Into an Array

    5. Description
    6. Objective
    7. 7.3 Adding/Removing From an Array

    8. Description
    9. Objective
    10. 7.4 Array Length and Looping Through Arrays

    11. Description
    12. Objective
    13. 7.5 Iterating Over an Array

    14. Description
    15. Objective
    16. 7.6 Finding an Element in a List

    17. Description
    18. Objective
    19. 7.7 Removing an Element From an Array

    20. Description
    21. Objective
    22. 7.8 Simulation

    23. Description
    24. Objective
    25. 7.9 Basic Data Structures Quiz

    26. Description
    27. Objective
  8. Digital Information

    1. 8.1 Intro to Digital Information

    2. Description
    3. Objective
    4. 8.2 Number Systems

    5. Description
    6. Objective
    7. 8.3 Encoding Text with Binary

    8. Description
    9. Objective
    10. 8.4 Pixel Images

    11. Description
    12. Objective
    13. 8.5 Hexadecimal

    14. Description
    15. Objective
    16. 8.6 Pixel Colors!

    17. Description
    18. Objective
    19. 8.7 Image Manipulation

    20. Description
    21. Objective
    22. 8.8 Data Compression

    23. Description
    24. Objective
    25. 8.9 Lossy Compression

    26. Description
    27. Objective
    28. 8.10 Cryptography

    29. Description
    30. Objective
    31. 8.11 Digital Information Quiz

    32. Description
    33. Objective
  9. Practice PT: Steganography

    1. 9.1 Practice PT: Steganography

    2. Description
    3. Objective
  10. Practice PT: Create an Image Filter!

    1. 10.1 Practice PT: Create an Image Filter!

    2. Description
    3. Objective
  11. The Internet

    1. 11.1 Welcome to the Internet

    2. Description
    3. Objective
    4. 11.2 Internet Hardware

    5. Description
    6. Objective
    7. 11.3 Internet Addresses

    8. Description
    9. Objective
    10. 11.4 Viewing Websites

    11. Description
    12. Objective
    13. 11.5 DNS

    14. Description
    15. Objective
    16. 11.6 Routing

    17. Description
    18. Objective
    19. 11.7 Packets and Protocols

    20. Description
    21. Objective
    22. 11.8 Sequential, Parallel & Distributed Computing

    23. Description
    24. Objective
    25. 11.9 Cybersecurity

    26. Description
    27. Objective
    28. 11.10 The Impact of the Internet

    29. Description
    30. Objective
    31. 11.11 Creative Credit & Copyright

    32. Description
    33. Objective
    34. 11.12 The Internet Quiz

    35. Description
    36. Objective
  12. Project: The Effects of the Internet

    1. 12.1 The Effects of the Internet

    2. Description
    3. Objective
  13. Data

    1. 13.1 Getting Started with Data

    2. Description
    3. Objective
    4. 13.2 Visualizing and Interpreting Data

    5. Description
    6. Objective
    7. 13.3 Data Collection & Limitations

    8. Description
    9. Objective
    10. 13.4 Data Quiz

    11. Description
    12. Objective
  14. Project: Present a Data-Driven Insight

    1. 14.1 Present a Data-Driven Insight

    2. Description
    3. Objective
  15. Project: The Impacts of Computing

    1. 15.1 The Impacts of Computing

    2. Description
    3. Objective
  16. Create Performance Task

    1. 16.1 Create Performance Task: Overview

    2. Description
    3. Objective
    4. 16.2 Create Performance Task: Guidelines

    5. Description
    6. Objective
    7. 16.3 Create Performance Task: Categories and Questions

    8. Description
    9. Objective
    10. 16.4 Planning and Pacing Your Project

    11. Description
    12. Objective
    13. 16.5 Complete the Create Performance Task

    14. Description
    15. Objective
  17. AP Exam Review

    1. 17.1 Preparation

    2. Description
    3. Objective
    4. 17.2 Practice AP Exam

    5. Description
    6. Objective
  18. Creative Development

    1. 18.1 Intro to Design Thinking

    2. Description
    3. Objective
    4. 18.2 Prototype

    5. Description
    6. Objective
    7. 18.3 Test

    8. Description
    9. Objective
    10. 18.4 Project Prep and Development

    11. Description
    12. Objective
  19. Final

    1. 19.1 Final

    2. Description
    3. Objective
  20. Midterm

    1. 20.1 Midterm

    2. Description
    3. Objective
  21. Extra Karel Practice

    1. 21.1 Extra Karel Practice

    2. Description
    3. Objective
  22. Extra Karel Puzzles

    1. 22.1 Extra Karel Puzzles

    2. Description
    3. Objective
  23. Karel Challenges

    1. 23.1 Challenge Problems

    2. Description
    3. Objective
  24. Web Development

    1. 24.1 Introduction to HTML

    2. Description
    3. Objective
    4. 24.2 Structure of an HTML Page

    5. Description
    6. Objective
    7. 24.3 Formatting Text

    8. Description
    9. Objective
    10. 24.4 Links

    11. Description
    12. Objective
    13. 24.5 Images

    14. Description
    15. Objective
    16. 24.6 HTML Lists

    17. Description
    18. Objective
    19. 24.7 HTML Tables

    20. Description
    21. Objective
    22. 24.8 HTML Styling

    23. Description
    24. Objective
    25. 24.9 Introduction to CSS

    26. Description
    27. Objective
    28. 24.10 CSS Select by Tag

    29. Description
    30. Objective
    31. 24.11 CSS Select by Class

    32. Description
    33. Objective
    34. 24.12 CSS Select by ID

    35. Description
    36. Objective
    37. 24.13 Web Development Quiz

    38. Description
    39. Objective
    40. 24.14 Practice PT: Your First Website

    41. Description
    42. Objective
  25. Functions and Parameters Practice

    1. 25.1 Functions and Parameters Practice

    2. Description
    3. Objective
  26. Extra Console Challenges

    1. 26.1 Prime Numbers

    2. Description
    3. Objective
  27. Animation and Games

    1. 27.1 Timers

    2. Description
    3. Objective
    4. 27.2 Random Circles

    5. Description
    6. Objective
    7. 27.3 Random Ghosts

    8. Description
    9. Objective
    10. 27.4 Bouncing Ball

    11. Description
    12. Objective
    13. 27.5 Mouse Events: Mouse Moved

    14. Description
    15. Objective
    16. 27.6 Drawing Lines

    17. Description
    18. Objective
    19. 27.7 Crazy Ball Game

    20. Description
    21. Objective
  28. Project: Breakout

    1. 28.1 Breakout

    2. Description
    3. Objective
  29. Data Structures Challenge Problems

    1. 29.1 Conway's Game of Life

    2. Description
    3. Objective
    4. 29.2 Connect Four

    5. Description
    6. Objective
  30. Visualizing Music

    1. 30.1 Visualizing Music

    2. Description
    3. Objective
  31. Project: Tic Tac Toe

    1. 31.1 Tic Tac Toe

    2. Description
    3. Objective
  32. Project: Helicopter Game

    1. 32.1 Game Design: Helicopter

    2. Description
    3. Objective
    4. 32.2 Basics

    5. Description
    6. Objective
    7. 32.3 Improvements

    8. Description
    9. Objective
    10. 32.4 Polish

    11. Description
    12. Objective
    13. 32.5 Intro to Computer Science Completed

    14. Description
    15. Objective
  33. More Basic Data Structures

    1. 33.1 Intro to Objects/Maps

    2. Description
    3. Objective
    4. 33.2 Basics of Objects

    5. Description
    6. Objective
    7. 33.3 Iterating Over an Object

    8. Description
    9. Objective
    10. 33.4 When Do I Use an Object?

    11. Description
    12. Objective
    13. 33.5 Intro to Sets

    14. Description
    15. Objective
    16. 33.6 Intro to Grids

    17. Description
    18. Objective
    19. 33.7 Looping Over a Grid

    20. Description
    21. Objective
    22. 33.8 Grid Example: Get a Row

    23. Description
    24. Objective
    25. 33.9 Data Structures Challenges

    26. Description
    27. Objective
  34. Computer Science Principles Pretest

    1. 34.1 Computer Science Principles Pretest

    2. Description
    3. Objective
  35. Computer Science Principles Posttest

    1. 35.1 Computer Science Principles Posttest

    2. Description
    3. Objective
  36. Practice PT: The Shopping List

    1. 36.1 Practice PT: The Shopping List

    2. Description
    3. Objective
  37. Practice PT: Testing 1, 2, 3 ...

    1. 37.1 Practice PT: Testing 1, 2, 3 ...

    2. Description
    3. Objective
  38. Removed Items (2024)

    1. 38.1 Practice PT: Pair-Programming Paint!

    2. Description
    3. Objective
    4. 38.2 Practice PT: Tell a Story

    5. Description
    6. Objective
    7. 38.3 Practice PT: Create an Image Filter!

    8. Description
    9. Objective
    10. 38.4 Practice PT: The Shopping List

    11. Description
    12. Objective
    13. 38.5 Practice PT: Testing 1, 2, 3...

    14. Description
    15. Objective
    16. 38.6 Create Performance Task

    17. Description
    18. Objective
    19. 38.7 Uses of Programs

    20. Description
    21. Objective
    22. 38.8 DNS

    23. Description
    24. Objective
    25. 38.9 Intro to Design Thinking

    26. Description
    27. Objective
    28. 38.10 Test

    29. Description
    30. Objective
    31. 38.11 Data

    32. Description
    33. Objective