2.2.1 Programming Fundamentals Flashcards
Addition operator
+
Subtraction operator
-
Multiplication operator
*
Division operator
/
Exponentiation operator
Quotient operator
DIV
Remainder operator
MOD
20 DIV 3
6
20 MOD 3
2
The assignment operator
=
What does the assignment operator do
Assigns values to constants or variables
Comparison operators
Compare the left hand side of the expression to the right and produces a Boolean value (true or false)
Is equal to
==
Is not equal to
!=
Is less than
<
Is greater than
>
Is less than or equal to
<=
Is greater than or equal to
> =
Constant
Assigned a value which cannot change
Variable
Assigned a value which can change
What happens if you attempt to change the value of a constant
An error is returned
What data values are written in quotation marks
Character, string
List the comparison operators
==
!=
<
>
<=
>=
What are the three constructs which affect program flow
-Sequence
-Selection
-Iteration