All posts by hodgesc

10/28-11/1


In this lesson, students will learn in greater detail about for loops. For loops in Javascript are written and executed in the same manner as Karel exercises, except now students will explore modifying the initialization statement, test statement, and increment statements of the loops.

Objective

Students will be able to…

  • Create for loops in JavaScript
  • Explain the purpose of for loops
  • Utilize for loops to avoid typing out repeated code
  • Use the loop counter i inside the for loop code to do something different on each iteration

For loops in Javascript are written and executed in the same manner as the Karel exercises. However, now we explore in more detail the other parts of the loop besides using it as just a counter. We can modify the initialization statement, test statement, and increment statement. The caterpillar problem is one of the more challenging problems because it has students combine several concepts. You will probably spend a week on for loops.

Objective

Students will be able to…
* Explain the three parts of the for loop (initialization statement, test statement, increment statement)
* Create for loops that iterate differently than the basic for loop structure (ie count by twos or count backwards)


For loops in Javascript are written and executed in the same manner as the Karel exercises. However, now we explore in more detail the other parts of the loop besides using it as just a counter. We can modify the initialization statement, test statement, and increment statement. The caterpillar problem is one of the more challenging problems because it has students combine several concepts. You will probably spend a week on for loops.

Objective

Students will be able to…

  • Explain the purpose of for loops
  • Create for loops to solve increasingly challenging problems
  • Create nested for loops: for loops inside of for loops

A randomizer gives a program the appearance of randomly generated number, color or attribute in a program. The Randomizer can be used in conjunction with nextInt(low, high)nextBoolean()nextFloat(low, high), and nextColor(). It can be utilized to make programs more interesting and engaging for users. With this lesson, students will be made to see how randomization can enhance a program and used in combination with various control structures.

Objective

Students will be able to…
* Explain why random numbers are a useful part of computer programs
* Create random values in a program
* Create programs that do something different on each run depending on random values that are generated
* Utilize the DOCS for the Randomizer class in order to learn how to generate random values


In this lesson students will explore while loops and JavaScript variables. This combines the ideas of creating variables, updating variables throughout a loop, and determining the correct ending condition. Note that the fibonacci problem is a bit tricky, so you may want to discuss the idea of that on the board or projector.

Objective

Students will be able to…

  • Explain the purpose of a while loop
  • Create while loops to repeat code while a condition is true
  • Utilize while loops to solve new types of problems

A Loop and a Half is a specific way to write a while loop with the condition being true. Inside the loop, you compare to a SENTINEL value to break out of the loop. This structure often allows you to write less code.

Objective

Students will be able to…
* Explain the how the loop-and-a-half structure is different from a traditional while loop
* Explain what an infinite loop is
* Explain what the break statement does
* Create programs that use the loop-and-a-half structure to repeat code until a SENTINEL is met, causing the program to break out of the loop

10/22-10/25


In this lesson, students will learn more about boolean values. Booleans refer to a value that is either true or false, and are used to test whether a specific condition is true or false.

Objective

Students will be able to…

  • Create boolean variables to represent meaningful yes/no values
  • Print out the value of a boolean variable

Logical operators allow us to connect or modify Boolean expressions. Three logical operators are the !, ||, && characters.
* ! = NOT
* || = OR
* && = AND
Logical operators can be used in combination.

With these logical operators, we can construct logical statements such as “I go to sleep when I am tired OR it’s after 9pm”, “I wear flip flops when I am outside AND it is NOT raining”

Objective

Students will be able to…
* Describe the meaning and usage of each logical operator: OR (||), AND (&&), and NOT (!)
* Construct logical statements using boolean variables and logical operators


Comparison operators let us compare two values. Using comparison operators in programming is similar to math in that less than <, greater than >, less than or equal to <=, and greater than or equal to >= are the same. The differences are that operators for equal to are == and not equal are !=. Using comparison operators allows our program to make decisions.

Objective

Students will be able to…
* Explain the meaning of each of the comparison operators (<, <=, >, >=, ==, !=)
* Create programs using the comparison operators to compare values
* Predict the boolean result of comparing two values
* Print out the boolean result of comparing values


JavaScript uses if statements as a way to make decisions and execute specific code. If statements are helpful in writing code that can be used in different situations.

Objective

Students will be able to…
* Explain the purpose of if statements
* Create their own if statements to selective choose which code is executed in their programs


For loops in Javascript are written and executed in the same manner as the Karel exercises. However, now we explore in more detail the other parts of the loop besides using it as just a counter. We can modify the initialization statement, test statement, and increment statement. The caterpillar problem is one of the more challenging problems because it has students combine several concepts. You will probably spend a week on for loops.

Objective

Students will be able to…
* Create for loops in JavaScript
* Explain the purpose of for loops
* Utilize for loops to avoid typing out repeated code
* Use the loop counter i inside the for loop code to do something different on each iteration

10/14-10/18


The basics of creating graphics objects to a screen relies on setting the type, shape, size, position, and color before on the artist’s canvas before adding to the screen. Using the geometric concepts, and the concept of getWidth() and getHeight(), multiple graphic objects can be created in JavaScript.

Objective

Students will be able to…
* Create graphical JavaScript programs that draw shapes on the canvas
* Locate points on the graphics canvas using (x, y) coordinates


In this lesson, students will learn how images are made up of pixels.

Objective

Students will learn what a pixel is and how they are used to create images.


Students will enhance their pixel images by incorporating RGB colors to each pixel.

Objective

Students will be able to create images using RGB values.

Notebooks are due Friday 10/18

10/7-10/11


Javascript uses the function println to print a message to the screen.

Objective

Students will be able to…
* Write a JavaScript program by typing commands with proper syntax in the start function
* Write a program that prints out a message to the user


Variables are like a box that can hold values. The steps to using variables are to first define it to a certain type such as Boolean, string, or integer and using suggested naming conventions. Secondly, variables must be initialized to a start value, and to assign it to a variable type.

Objective

Students will be able to…
* Explain what variables are and what they are used for
* Create their own variables
* Print out the values stored in variables


User input is a cornerstone of any interactive program. In this lesson we learn how we can allow the user to input information into our programs. This will make our programs much more interactive and useful.

Objective

Students will be able to…
* Create programs that ask the user for input
* Store user input in variables and print it back to the user
* Choose the proper input function to use depending on the type of information needed


Computers are excellent machines for performing mathematical operations. In this lesson we learn about the different mathematical operators we can use to perform mathematical computations, and we create useful programs that compute useful information for the user.

Objective

Students will be able to…
* Describe the different mathematical operators we can use in programs
* Create programs that use basic math to compute useful things
* Create programs that take in user input, do simple computations with the input, and produce useful output


The basics of creating graphics objects to a screen relies on setting the type, shape, size, position, and color before on the artist’s canvas before adding to the screen. Using the geometric concepts, and the concept of getWidth() and getHeight(), multiple graphic objects can be created in JavaScript.

Objective

Students will be able to…
* Create graphical JavaScript programs that draw shapes on the canvas
* Locate points on the graphics canvas using (x, y) coordinates

9/30-10/4


In this lesson, students will learn about the impact of visually representing data to make information easier to analyze and use.

Objective

Students will be able to:

  • Explain the importance of visually depicting data to make information easier to use and to understand trends and changes in information

In this lesson, students will learn what copyright laws are and how to avoid copyright infringement. They will explore why copyright laws are important and how they protect the creators.

Objective

SWBAT explain what copyright laws are and why they are important
SWBAT find images they are legally allowed to use in their projects
SWBAT accurately attribute images they find and want to use


Now that students have learned about digital citizenship and cyber hygiene, they will take what they have learned and create a PSA to inform members in the community about a topic!

Objective

SWBAT create a public service announcement for members of their community about a topic in digital citizenship or cyber hygiene.


Digital Citizenship and Cyber Hygiene unit quiz

Lesson Plans9/23-27


In this lesson, students will learn about the impact of visually representing data to make information easier to analyze and use.

Objective

Students will be able to:

  • Explain the importance of visually depicting data to make information easier to use and to understand trends and changes in information

In this lesson, students will learn what copyright laws are and how to avoid copyright infringement. They will explore why copyright laws are important and how they protect the creators.

Objective

SWBAT explain what copyright laws are and why they are important
SWBAT find images they are legally allowed to use in their projects
SWBAT accurately attribute images they find and want to use


Now that students have learned about digital citizenship and cyber hygiene, they will take what they have learned and create a PSA to inform members in the community about a topic!

Objective

SWBAT create a public service announcement for members of their community about a topic in digital citizenship or cyber hygiene.


Digital Citizenship and Cyber Hygiene unit quiz

Notebooks due Friday 9/27/2019

Lesson Plans 9/16-9/20


As students use the Internet, they are building their digital footprint. In this lesson, students understand how they can control and protect their footprint.

Objective

SWBAT understand how their online activity contributes to a permanent and public digital footprint.
SWBAT articulate their own social media guidelines to protect their digital footprint.


Cyberbullying is the use of electronic communication to harass or target someone. Cyberbullying includes sending, posting, or sharing negative, harmful, false, or mean content about someone else.

Objective

SWBAT understand the impact of cyberbullying, and identify unacceptable bullying behavior
SWBAT identify proper actions to take if they are victims of cyberbullying or if they observe someone being cyberbullied


The Internet is a great place to socialize, but it is important to be aware of risks. Common sense and following safety guidelines can help students stay safe online.

Objective

SWBAT identify predatory behavior and how to respond to it online.


Using best practices like setting strong passwords, reading privacy policies, and using https can help us stay safe online.

Objective

SWBAT use best practices in personal privacy and security, including strong passwords, using https, and reading privacy policies


Information literacy is having the ability to find information, evaluate information credibility, and use information effectively.

Objective

SWBAT effectively search for and evaluate resources.

Lesson Plans 9/9-9/13


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
 }

Objective

Students will be able to:

  • Explain the purpose of an If/Else statement
  • Create If/Else statements to solve new types of problems
  • Identify when it is appropriate to use an If/Else statement

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.

Objective

Students will be able to:

  • Explain the purpose of a while loop
  • Create while loops to repeat code while a condition is true
  • Utilize while loops to solve new types of problems
  • Test their solutions on different Karel worlds

In this lesson, students learn how to combine and incorporate the different control structures they’ve learned to create more complex programs.

Objective

Students will be able to:

  • Identify the different control structures we can use to modify the flow of control through a program
  • Combine control structures to solve complicated problems
  • Choose the proper control structure for a given problem

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.

Objective

Students will be able to:

  • Debug common errors in code
  • Use control structures to create general solutions that work on all Karel worlds

In this lesson, students review how they should indent their code to make it easier to read.

Objective

Students will be able to:

  • Explain why it is important to indent code
  • Identify proper indentation
  • Modify a program to have proper indentation
  • Write programs with proper indentation

Debugging is a very important part of programming. In this lesson, students learn how to effectively debug their programs.

Objective

Students will be able to use debugging strategies to find and fix errors in their code.

Notebooks Due on Friday 9/13

Lesson Plans 9/3-9/6


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

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

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!

Objective

Students will be able to:

  • Write programs that use SuperKarel instead of Karel
  • Utilize the new toolbox of commands that SuperKarel provides over Karel
  • Read documentation to understand how to use a library (SuperKarel is an example of this)

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
}

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

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
}

Objective

Students will be able to:

  • Use conditions to gather information about Karel’s world (is the front clear, is Karel facing north, etc)
  • Create if statements that only execute code if a certain condition is true

Lesson Plans 8/26-8/30


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.

Objective

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?

Objective

Students will be able to…

  • Identify the direction that Karel is facing
  • Predict what direction Karel will be facing after executing a series of commands
  • Identify a location in Karel’s world using Street, Avenue terminology

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.

Objective

Students will be able to:

  • Define a function, and successfully implement functions in their code.
  • Teach Karel a new command by creating a turnRight() function

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

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();
}

Objective

Students will be able to:

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

Notebooks are due Friday August 30th.