Please enable JavaScript to use CodeHS

Intro to Programming with Karel the Dog (Ace)

Description

In this lesson, students learn in more detail about functions, and how they can use functions to break down their programs into smaller pieces and make them easier to understand.

Objective

Students will be able to:

  • Create functions to teach Karel new commands
  • Explain the difference between defining and calling a function
  • Utilize these functions to write higher level Karel programs that go beyond the basic toolbox of commands that Karel starts with
Description

This lesson provides students with extra practice in creating custom functions.

Objective

Students will be able to:

  • Create their own functions
  • Utilize functions to create higher order programs that go beyond the basic toolbox of Karel commands
  • Debug programs that use functions incorrectly
Description

In this lesson, students will deepen their understanding of functions by learning about the main function. The main function helps to organize the readability of code by creating a designated place where code that is going to be run in a program can be stored:

function main(){
   turnRight();
}

function turnRight(){
   turnLeft();
   turnLeft();
   turnLeft();
}

main();
Objective

Students will be able to:

  • Explain the functionality of the main function
  • Use the main function appropriately in their programs
  • Improve the readability of their code
Description

In this lesson, students learn about Top Down Design and Decomposition. Top Down Design is the process of breaking down a big problem into smaller parts.

Objective

Students will be able to:

  • Break a large problem down into smaller, simpler problems
  • Write methods that solve the simpler problems, and use them as building blocks to solve the larger problem
  • Compare programs and identify good vs poor decomposition