Types of Operators

Relational Operators:

Allows you to compare two values.


There are three Relational Operators:

  1. greater than
  2. less than
  3. equal to

Logic Operators:

Combine two or more Relational Operators to result in a single true/false value.


There are three Logic Operators:

  1. and
  2. or
  3. not

Arithmetic Operators:

Arithmetic operations allow you to code programs that add, subtract, multiply, and divide.


Bitwise Operator:

The bitwise operator looks directly at the binary digits or binary bits of an integer.


Assignment Operators:

Used for assigning values to variables.


Identity Operators:

Used for comparing two or more objects based on their ID’s.


Membership Operators:

Membership operators are used to verifying whether a particular element is a part of a sequence or not.


Previous Section

Next Section


Copyright © 2021 Code 4 Tomorrow. All rights reserved. If you would like to use content from any of our courses, you must obtain our explicit written permission and provide credit. Please contact classes@code4tomorrow.org for inquiries.