Please enable JavaScript to use CodeHS

AP Computer Science Principles in JavaScript

Introduction to Programming

Karel is a dog that only knows how to move, turn left, and place tennis balls in his world. You can give Karel these commands to instruct him to do certain things. We use Karel to show you what it means to program, and allow you to focus on problem-solving.

Lessons

1.1 Welcome to AP CSP

  • Welcome to AP CSP
  • Why AP CSP?

1.2 Introduction to Programming With Karel

  • Introduction to Programming With Karel
  • Quiz: Karel Commands
  • Our First Karel Program
  • Your First Karel Program
  • Short Stack
  • +1 more

1.3 More Basic Karel

  • More Basic Karel
  • More Basic Karel Quiz
  • Tennis Ball Square
  • Make a Tower
  • Pyramid of Karel
  • +1 more

1.4 Karel Can't Turn Right

  • Karel Can't Turn Right
  • Karel Can't Turn Right Quiz
  • Tower and Turn Right
  • Fireman Karel
  • Slide Karel
  • +2 more

1.5 Functions in Karel

  • Functions in Karel
  • Functions in Karel Quiz
  • Turn Around
  • Pancakes
  • Backflip
  • +2 more

1.6 The Start Function

  • The Start Function
  • The Start Function Quiz
  • Tower with Start Function
  • Pancakes with Start
  • Digging Karel with Start

1.7 Top Down Design and Decomposition in Karel

  • Top Down Design and Decomposition in Karel
  • Top Down Design and Decomposition Quiz
  • Hurdle Karel
  • The Two Towers
  • Make a 'Z'
  • +1 more

1.8 Commenting Your Code

  • Commenting Your Code
  • Commenting Your Code Quiz
  • Hurdle Karel
  • The Two Towers + Comments
  • Reflection: Commenting

1.9 Abstraction

  • Abstraction
  • Abstraction Quiz
  • Abstracting Away buildTower
  • Abstracting Your Day
  • Reflection: Abstraction
  • +1 more

1.10 Super Karel

  • Super Karel
  • Super Karel Quiz
  • Hurdle Karel (with SuperKarel)
  • The Two Towers + SuperKarel
  • Super Karel Badge

1.11 For Loops

  • For Loops
  • For Loops Quiz
  • Repeated Move
  • Put Down Tennis Balls
  • Take 'em All
  • +3 more

1.12 If Statements

  • If Statements
  • If Statements Quiz
  • If Statements
  • Safe Take Ball
  • Is There a Ball?
  • +1 more

1.13 If/Else Statements

  • If/Else Statements
  • If/Else Statements Quiz
  • If/Else Statements
  • One Ball in Each Spot
  • Right Side Up
  • +1 more

1.14 While Loops in Karel

  • While Loops in Karel
  • While Loops in Karel Quiz
  • Move to Wall
  • Follow The Yellow Ball Road
  • Lay Row of Tennis Balls
  • +1 more

1.15 Control Structures Example

  • Control Structures Example
  • Control Structures Example Quiz
  • Cleanup Karel
  • Random Hurdles

1.16 Debugging Strategies

  • Debugging Basics
  • Debugging Basics
  • Debug: The Two Towers
  • Debug: Lots of Hurdles
  • Debugging From Error Messages
  • +3 more

1.17 Karel Algorithms

  • Karel Algorithms
  • Quiz: Which Control Structure?
  • Algorithms Example: Move Stack
  • Move Tennis Ball Stack
  • Climbing Karel
  • +1 more

1.18 How to Indent Your Code

  • How to Indent Your Code
  • How to Indent Your Code Quiz
  • Dance and Clean Karel
  • Diagonal
  • Staircase

1.19 Ultra Karel

  • Ultra Karel
  • Ultra Karel Quiz
  • Red Frame
  • Slip 'n Slide
  • Invert Colors
  • +2 more

1.20 Karel Challenges

  • Fetch
  • Racing Karel
  • Tower Builder
  • Super Cleanup Karel
  • Double Tennis Balls
  • +1 more

1.21 Introduction to Programming Quiz

  • Introduction to Programming Quiz

Courses that include this module