Please enable JavaScript to use CodeHS

Intro to Programming with Karel the Dog (Ace)

Description

In this lesson, students learn how to style their programs by including comments. Comments allow students to leave notes on their program that makes it easier for other to read. Comments are written in plain English.

Commenting Your Code Example:

/*
 *  multi-line  comments
 */

// single line comments
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
Description

In this lesson, students are introduced to Super Karel! Since commands like turnRight() and turnAround() are so commonly used, students shouldn’t have to define them in every single program. This is where Super Karel comes in. Super Karel is just like Karel, except Super Karel already knows how to turnRight and turnAround, so students don’t have to define those functions anymore!

Objective

Students will be able to:

  • Write programs that use Supe rKarel instead of Karel
  • Utilize the new toolbox of commands that Super Karel provides over Karel
  • Read documentation to understand how to use a library (Super Karel is an example of this)
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

This lesson gives students more practice creating and debugging for loops. The for loop allows you to repeat a specific part of code a fixed number of times.

Objective

Students will be able to:

  • Create for loops to repeat code a fixed number of times
  • Debug programs with incorrect for loop usage
  • Explain when a for loop should be used