Please enable JavaScript to use CodeHS

Nevada Advanced Computer Science I

Description

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
Description

In this lesson, students learn about if statements as a way to make decisions and execute specific code depending on the validity of a condition.

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
Description

In this lesson, students will learn about logical operators. Logical operators allow students to connect or modify Boolean expressions. Three logical operators are the !, ||, && characters.

  • ! = NOT
  • || = OR
  • && = AND
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
Description

In this lesson, students learn how to use comparison operators. Comparison operators let students compare two values.

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
Description

In this lesson, students will apply their understanding of if/else statements to graphics programs. Students will also learn how to use else if statements to check for multiple conditions.

Objective

Students will be able to:

  • Write graphics programs with conditionals
  • Use else if statements to check for multiple conditions
Description

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.

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
Description

In this lesson, students will learn how to create a Loop and Half. A Loop and a Half is a specific way to write a while loop with the condition being true. Inside the loop, students use a break statement to break out of the loop whenever that condition is met, causing the loop to end.

Objective

Students will be able to:

  • Explain 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
Description

In this lesson, students will apply their understanding of while loops to graphics programs.

Objective

Students will be able to:

  • Write graphics programs that use while loops
  • Use variables to update the position and size of graphics objects within a while loop
Description

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
Description

In this lesson, students will apply what they have learned about for loops to graphics programs.

Objective

Students will be able to:

  • Create graphics programs with for loops
  • Use i to position graphics objects and change the size of graphics objects
  • Compare and contrast while loops and for loops
Description

In this lesson, students review content with a 15 question Unit Quiz.

Objective

Students will be able to:

  • Prove their knowledge of control structures through a multiple choice quiz