Please enable JavaScript to use CodeHS

AP Computer Science Principles in Roblox

Lesson 2.2 Comparison and Logical Operators

Description

In this lesson, students will learn about comparison and logical operators. Comparison operators let students compare two values. Logical operators allow students to connect or modify Boolean expressions. Three logical operators are not, and, and or.


Objective

Students will be able to:

  • Explain the meaning of each of the comparison operators (<, <=, >, >=, ==, ~=)
  • Describe the meaning and usage of each logical operator: not, and, and or
  • Construct logical statements using boolean variables and logical 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