A(n) ________ operator determines whether a specific relationship exists between two values.

The _____ statement is used to create a decision structure which allows a program to have more than one path of execution

The if statement causes one or more statements to execute only when a boolean expression is ______

determines whether a specific relationship exists between two values. Example: greater than >

All relational operators are ______

True or False?
The conditionally executed statement should appear on the line after the if statement

True or False?
The conditionally executed statement should be indented one level from the if statement

Do you put a semicolon after the if (expression) portion of an if statement?

If you prematurely terminate an if statement with a semicolon the compiler will not display an error message, but will assume you are placing a _______ there.

Null statement (empty statement that does nothing)

Enclosing a group of statements inside braces creates a _____ of statements

A ______ is a boolean variable that signals when some condition exists in the program

When the flag variable is set to false it indicates the condition _______

When the flag variable is set to true it means the condition ______

________ is an international encoding system that is extensive enough to represent all characters of all the world's alphabets

True or False?
In Unicode the uppercase letters come before the lowercase letters

The ________ statement will execute one group of statements if its boolean expression is true, or another group id its boolean expression is false.

To test more than one condition use _______ statements

The ______ statement tests a series of condtitions

connect two or more relational expressions into one or reverse the logic of an expression

AND. Both expressions must be true for the overall expression to be true

OR. One or both expressions must be true for the overall expression to be true

NOT. Reverses the truth of a boolean expression

The && operator performs ______ evaluation

Short circuit. If the expression on the left side is false, the expression on the right side will not be checked.

The || operator performs ________ evaluation.

Short circuit. If the expression on the left side is true, the expression on the right side will not be checked.

Order of precedence for logical operators

The ____ statement lets the value of a variable or expression determine where the program will branch to.

The switch statement is a _______ structure.

Multiple Alternative Decision Structure

True or False?
In a switch statement each of the case values must be unique.

Without ___ statements the program would execute all of the lines from the matching case statement to the end of the block

focusNode

Didn't know it?
click below

Knew it?
click below

A(n) ________ operator determines whether a specific relationship exists between two values.

Embed Code - If you would like this activity on your web page, copy the script below and paste it into your web page.

  Normal Size     Small Size show me how

Introduction to Programming Chapter 04 - Terms

TermDefinition
Decision Structure (function) A decision structure (AKA selection structure) allows a program to perform actions only under certain conditions.
NOT operator Takes a Boolean expressions as its operand and reverses its logical value.
Short-Circuit Evaluation AND: If the expression to the left of the operand is false, right side is not checked. OR: If the expression to the left of the operand is true, right side is not checked.
OR operator Takes two Boolean expressions as operands and creates a compound Boolean expression that is true when either of the subexpressions is true.
&& AND operator
| | OR operator
!. NOT operator
AND operator Takes two Boolean expressions as its operand and creates a compound Boolean expression that is true only when both subexpressions are true.
Case Structure (AKA) Multiple Alternative Decision Structure
Case Structure (function) Allows you to test the value of a variable or an expression and then use that value to determine which statement or set of statements to execute.
Decision Structure (AKA) Selection Structures
conditionally executed performed only when a certain condition is true.
Single Alternative Decision Structure Provides only one alternative path.
You can use Decision Statements alone to create a complete program? T/F False
If Clause The program line that begins with IF
condition Any expression that can be evaluated as either true or false. AKA Boolean Experssion
Boolean Expressions Expressions that can be evaluated as either true or false.
Relational Operator (function) Determines whether a specific relationship exists between two values.
Relational Operators (examples) > < >= <= == !=
Which relationship operators test for more than one relationship? <= >=
== a relational operator that determines whether the operand on its left is equal to the operand on its right.
Why are two == used? To differentiate between the relational operator and the assignment operator.
Control Structure A logical design that controls the order in which a set of statements executes.
Dual Alternative Decision Structures Two possible paths of execution. One path if TRUE, Another path if FALSE.
What statement do you use in pseudocode to express dual alternative decision structure. If - Else
String Comparisons are case sensitive in most programming languages. T/F True
Nested Decision Structures A decision structure can be nested inside another decision structure to test more than one condition.
If - Then - Else - If statement a simpler way logically to write a nested decision structure.
testExpression The first line of a case structure following Select
Multiple Alternative Decision Structure (AKA) Case Structure
Multiple Alternative Decision Structure (function) Allows you to test the value of a variable or an expression and then use that value to determine which statement or set of statements to execute.
Logical Operators (examples) And Or Not
Logical Operators (function) Allow you to create complex Boolean expressions.
Which Logical Operator would you use to determine whether a numeric value is within a specific range or our of a specific range? AND
Boolean Variable Can hold one of two values: true or false
Which variable is commonly used as a flag? Boolean
What are the four types of variables we've learned so far? Integer Real String Boolean


What operators determine whether a specific relationship exists between two values?

Relational operators are important for making decisions. They allow us compare numeric and char (chars are treated like numbers in C++) values to determine if one is greater than, less than, equal to, or not equal to another. Relational operators are binary meaning they require two operands.

Which operator is used to determine the relationship between two or more operands?

In computer science, a relational operator is a programming language construct or operator that tests or defines some kind of relation between two entities. These include numerical equality (e.g., 5 = 5) and inequalities (e.g., 4 ≥ 3).

What type of operator can be used to determine whether?

Introduction to Programming 04.

What type of operators are the following ==?

Relational Operators == (Equal to)– This operator is used to check if both operands are equal.