Programming Operators Full-Color Poster Infographic

;
BrainStemSchool
98 Followers
Grade Levels
5th - 12th, Higher Education, Homeschool
Resource Type
Formats Included
  • PDF
Pages
1 page
$7.99
List Price:
$12.00
You Save:
$4.01
$7.99
List Price:
$12.00
You Save:
$4.01
Share this resource
Report this resource to TPT
BrainStemSchool
98 Followers

Description

High Resolution pdf format

PROGRAMMING OPERATORS

Mathematical Operators

Operator Meaning Example

+ Addition x=4+4 # x is 8

- Subtraction y=4-4 # y is 0

* Multiplication z=4*4 # z is 16

/ Division a=4/4 # a is 1

* Multiplication b=4*4 # b is 16

^ or ** Exponentiaton (language dependent) c=4**4 # c is 256

& or + String Concatenation d="4"+"4" # d is "44"

MOD or % Modulus (remainder of division) e=22%5 # e is 2

DIV Quotient (whole number division) f=22 DIV 5 # f is 4

Use the acronym BIDMAS to remember order of operation:

Brackets, Indices, Dvision/Multiplcation, Addition/Subtraction

Assignment Operators

Put a value in a container / variable or copy a value from one variable to another

  • The equal sign = makes assignments
  • The left side MUST be a variable
  • The right side MUST evaluate to a value x=5
    of the appropriate type

The right side may be:

  • A literal value……………………………………………..…….……………...…….…….y=237.32
  • Another variable………………………………………..…….……………...…….…….z=a
  • An expression…………………………………………....…….…….…………..….…….b=c+25*d
  • A function/method with a return value…….…….…………..….…….…….e=Math.floor(3.1415926)

Relational Operators

Return a boolean (true or false) value describing the numerical relationship of the two primitive operands

Operator Meaning Example

> Greater Than 15 > 10

< Less Than 3 < 99

== Equal To 10-5 == 2+3

>= Greater Than Or Equal To 17 >= 11

<= Less Than Or Equal To 14 <= 14

!= Not Equal To 175 == 175

Objects frequently require “deep comparison” using member methods.

object1==object2 # do the references point to the same object

object1.equals(object2) # compares instance values within each object

Boolean Operators

Return a boolean (true or false) value describing the logical relationship of the two boolean operands

Operator Meaning Example

AND && Returns true if and only if both operands are true TRUE&&FALSE==FALSE

OR || Returns false if and only if both operands are false   TRUE||FALSE==TRUE

NOT ! Returns the opposite boolean value !TRUE==FALSE

Total Pages
1 page
Answer Key
N/A
Teaching Duration
N/A
Report this resource to TPT
Reported resources will be reviewed by our team. Report this resource to let us know if this resource violates TPT’s content guidelines.

Reviews

Questions & Answers

98 Followers
TPT

TPT empowers educators to teach at their best.

More About Us

Keep in Touch!

Sign Up