Module 1 Flashcards
(19 cards)
containers for storing data values.
Variables
variables must be identified with unique names. These unique names are called
identifiers
are used to perform operations on variables and values.
Operators
are used to perform common mathematical operations.
Arithmetic operators
are used to assign values to variables.
Assignment operators
are used to compare two values.
Comparison operators
are used to determine the logic between variables or values
Logical operators
Use the _______to specify a block of C++ code to be executed if a condition is true.
The if Statement
use the ____to specify a block of code to be executed if the
condition is false.
The else Statement
Use the _____ to specify a new condition if the first condition is false.
The else if Statement
use this statement to select one of many code blocks to be executed.
Switch Statements
it breaks out of the switch block.
The break Keyword
specifies some code to run if there is no case match
The default Keyword
are handy because they save time, reduce errors, and they make code more readable.
Loops
loops through a block of code as long as a specified condition is true
While Loop
is a variant of the while loop. This loop will execute the code block once, before checking if the condition is true, then it will repeat the loop as long as the condition is true.
The Do/While Loop
When you know exactly how many times you want to loop through a block of code
For Loop
used to jump out of a loop.
Break
breaks one iteration (in the loop), if a specified condition occurs, and continues with the next iteration in the loop.
Continue