Exam 5: Making Decisions

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

Match each term with the correct statement below. -> or <

(Multiple Choice)
4.8/5
(89)

When you use nested if statements, you must pay careful attention to placement of any else clauses.

(True/False)
4.9/5
(78)

A(n) ____ is a series of if statements that determine whether a value falls within a specified range.

(Multiple Choice)
5.0/5
(71)

The simplest statement you can use to make a decision is the ____ statement.

(Multiple Choice)
4.9/5
(82)

When writing a statement with the two-line format, you must be sure to type a semicolon at the end of the first line in order to ensure accurate results.

(True/False)
4.9/5
(78)

Match each term with the correct statement below. -A double equal sign

(Multiple Choice)
4.8/5
(66)

In the switch structure, break is followed by one of the possible values for the test expression and a colon.

(True/False)
4.9/5
(79)

What is wrong with the following statement? How could you correct it? if(payRate < 5.85 && payRate > 60) System.out.println("Error in pay rate");

(Essay)
4.8/5
(82)

A(n) ____ statement is the decision structure you use when you need to take one or the other of two possible courses of action.

(Multiple Choice)
4.8/5
(87)

Write a single-alternative if statement that will check if a variable named maxValue is equal to 100. If true, use a println statement to output "You have reached the limit".

(Essay)
4.7/5
(82)

When you create a block, you must place multiple statements within it.

(True/False)
4.8/5
(76)

A ____ checks a value, and based on the result performs one of two actions.

(Multiple Choice)
5.0/5
(84)

Just as you can block statements that depend on an if, you can also block statements that depend on a(n) ____.

(Multiple Choice)
4.8/5
(81)

You can use the ____, which is written as ||, if you want some action to occur when at least one of two conditions is true.

(Multiple Choice)
4.8/5
(77)

Match each term with the correct statement below. -An alternative to using a series of nested if statements

(Multiple Choice)
5.0/5
(76)

The compiler does not take indentation into account when compiling code, but consistent indentation can help readers understand a program's ____.

(Multiple Choice)
5.0/5
(90)

When working with logical operators, you can always use ____ to change precedence.

(Multiple Choice)
4.7/5
(77)

The AND operator is written as two ____.

(Multiple Choice)
4.8/5
(80)

Although not required, it is common procedure to align the keyword if with the keyword else.

(True/False)
4.9/5
(86)

Match each term with the correct statement below. -Two ampersands

(Multiple Choice)
4.8/5
(89)
Showing 41 - 60 of 70
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)