In this lesson, students are introduced to CodeHS and how Karel the Dog can be given a set of instructions to perform a simple task.
Students will be able to:
Write their first Karel program by typing out all of the Karel commands with proper syntax
Explain how giving commands to a computer is like giving commands to a dog
In this lesson, students learn more about Karel and Karel’s world. Students learn about walls in Karel’s world, the directions Karel can face, and how to identify a location in Karel’s world using streets and avenues. In these exercises, students will begin to see the limitations of Karel’s commands. Students will need to apply Karel’s limited set of commands to new situations. For example, how can they make Karel turn right, even though Karel does not know a turnRight command?
Students will be able to…
In this lesson, students will learn how they can create their own commands for Karel by calling and defining functions. Functions allow programmers to create and reuse new commands that make code more readable and scalable.
Students will be able to:
turnRight()
functionIn 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.
Students will be able to:
In this lesson, students will deepen their understanding of functions by learning about the start function. The start 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 start(){
turnRight();
}
function turnRight(){
turnLeft();
turnLeft();
turnLeft();
}
Students will be able to:
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.
Students will be able to:
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
Students will be able to:
In this lesson, students will learn about abstraction. Abstraction is the act of managing complexity by dissociating information and details in order to focus on relevant concepts.
Students will be able to:
This lesson builds toward the following Enduring Understandings (EUs) and Learning Objectives (LOs). Students should understand that…
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 SuperKarel comes in. SuperKarel is just like Karel, except SuperKarel already knows how to turnRight and turnAround, so students don’t have to define those functions anymore!
Students will be able to:
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(var i = 0; i < 4; i++)
{
// Code to be repeated 4 times
}
Students will be able to:
In this lesson, students learn about the conditional statement “if”. Code within an “if statement” will only execute IF the condition is true.
if (frontIsClear()) {
// Code to be executed only if front is clear
}
Students will be able to:
In this lesson, students learn about an additional control structure, if/else statements. If/else statements let students do one thing if a condition is true, and something else otherwise.
if/else statements are written like this:
if(frontIsClear())
{
// code to execute if front is clear
}
else
{
// code to execute otherwise
}
Students will be able to:
In this lesson, students are introduced a new type of loop: while loops. While loops allow Karel to repeat code while a certain condition is true. While loops allow students to create general solutions to problems that will work on multiple Karel worlds, rather than just one.
Students will be able to:
In this lesson, students learn how to combine and incorporate the different control structures they’ve learned to create more complex programs.
Students will be able to:
In this lesson, students get extra practice with control structures. Students will continue to see different ways that the if, if/else, while, and for loops affect their code and what Karel can do.
Students will be able to:
In this lesson, students review how they should indent their code to make it easier to read.
Students will be able to:
Debugging is a very important part of programming. In this lesson, students learn how to effectively debug their programs.
Students will be able to use debugging strategies to find and fix errors in their code.