• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/39

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

39 Cards in this Set

  • Front
  • Back
Boolean expression
A Boolean Expression is one that represents only one of two states, usually expressed as true or false
if-then
An if-then decision structure contains a tested Boolean expression and an action that is taken only when the expression is true
if-then clause
An if-then clause of a decision holds the action that results when the Boolean expression in the decision is true,
else clause
The else clause of a decision holds the action or actions that execute only when the boolean expression in the decision is false
Relational comparison operators
Relational comparison operators are the symbols that express Boolean comparisons.

Examples include = , > , <, <=, >=, <>
Trivial Expression
A trivial expression is one that always evaluates to the same value
compound condition
A compound condition is constructed when you need to ask multiple questions before determining an outcome
And decision
An And decision contains two or more decisions, all conditions must be true for an action to take place
nested decision
A nested decision or nested if, is a decision within either the if-then or else clause of take place
cascading if statement
A cascading if statement is a series of nested if statements
conditional AND operator
A conditional AND operator (or more simply, an AND Operator) is a symbols that you use to combine decisions so that two or more conditions must be true for an action to occur.
Truth Tables
Truth Tables are diagrams used in mathematics and logic to help describe the truth of its parts
Short-circuit evaluation
is a logical feature in which expressions in each part of a larger expression are evaluated only as far as necessary to determine final outcome
OR decision
An OR decision contains two or more decisions; if at least one condition is met, the resulting action takes place.
Conditional OR operator
A conditional OR operator (or, more simply, an OR operator) is a symbol that you use to combine decisions when any one condition can be true for an action to take place.
logical NOT operator
The logical NOT operator is a symbol that reverses the meaning of a Boolean expression
range check
When you use the range check, you compare a variable to a series of values that mark the limiting ends of ranges
dead or unreachable path
A dead or unreachable path is a logical path that can never be traveled
Precedence
Precedence is the quality of operation that determines the order in which it is evaluated
1. The selection statement if quantity > 100 then discountRate = RATE is an example of a
a. Dual-alternative selection
b. Single alternative selection
c. Structured loop
d. All of the above
b. Single alternative selection
2. The selection statement if day of week = “Sunday” then price = Lower_Price else price is higher is an example of a
a. Dual-alternative selection
b. Single alternative selection
c. Unary
d. All of the above
a. Dual-alternative selection
3. All selection statements must have ___________.
a. A then clause
b. An else clause
c. Both a and b
d. None of the above
A then clause
4. An expression like amount < 10? Is a(n) ______________ expression.
a. Gregorian
b. Edwardian
c. Machiavellian
d. Boolean
d. Boolean
5. Usually, you compare only variables that have the same
a. Type
b. Size
c. Name
d. Value
a. Type
6. Symbols such as > and < are known as _____________ operators
a. Arithmetic
b. Sequential
c. Relational comparison
d. Scripting accuracy
c. Relational comparison
7. If you could use only three relational comparison operators, you could get by with _____.
a. Greater than, less than, and greater than or equal to
b. Equal to, less than, and greater than
c. Less than, less than or equal to and not equal to
d. Equal to, not equal to, and less than
c. Less than, less than or equal to and not equal to
8. If a > b is false, then which of the following is always true
a. A<=b
b. A<b
c. A=b
d. A>=b
a. A<=b
9. Usually, the most difficult comparison operator to work with is ________________
a. Equal to
b. Greater than
c. Less than
d. Not equal to
d. Not equal to
10. Which lettered choice is equivalent to the following decision?
If x> 10 then
If y>10 then
Output “x”
Endif
Endif

a. If x > 10 OR y > 10 then output “x”
b. If x > 10 AND x > x then output “x”
c. If y > x then output “x”
d. If x > 10 AND y > 10 then output “x”
d. If x > 10 AND x > y then output “x”
11. The Midwest Sales region of Acme Computer Company consists of five states Illinois, Indiana, Iowa, Missouri and Wisconsin. About 50 % of the regional customer reside in Illinois, 20 percent of Indiana, and 10 percent in each of the other three states. Suppose you have input records containing ACME customer data, including state of residence. To most efficiently select and display all customers who live in the Midwest Sales region, you would ask first about residency in ______________
a. Illinois
b. Indiana
c. Either Iowa, Missouri, o0r Wisconsin – It does not matter which of these three is first
d. Any of the five states – it does not matter which one is first
a. Illinois
12. The Boffo Balloon Company makes helium balloons. Large Balloons cost $13.00 a dozen. Medium sized balloons cost $8.60 a dozen. About 60% of the company’s sales are of the smallest balloons, 30 percent are medium, and large balloons constitute only 10 percent of sales. Customer order records include customer information, quantity ordered, and size. To write a program that makes the most efficient determination of an orders’ price based on size ordered, you should first ask first weather the size is _____________?
a. Large
b. Medium
c. Small
d. It does not matter
c. Small
13. The Boffo Balloon company makes helium balloons in three sizes, 12 colors and with a choice of 40 imprinted sayings. As a promotion, the company is offering a 25% discount on orders of large, red balloons, imprinted with the string “ Happy Valentines Day”, To most efficiently select the orders to which a discount applies, you would use _____________
a. Nested if statements using OR logic
b. Nested if statement using AND logic
c. Three completely separate unnested if statements
d. Not enough information is given
b. Nested if statement using AND logic
14. In the following pseudocode, what percentage raise will an employee in Department 5 receive
If department < 3 then
Raise = SMALL_RAISE
Else
If department is < 5 then
Raise = MED_RAISE
Else
RAISE = BIG_RAISE
Endif
endif
a. SMALL_RAISE
b. MEDIUM_RAISE
c. BIG_RAISE
d. Impossible to tell
c. BIG_RAISE
15. In the following pseudocode, what percentage raise will an employee in Department 8 Receive
If department < 5 then
Raise = SMALL_RAISE
Else
If department is < 14 then
Raise = MEDIUM RAISE
Else
If department < 9 then
Raise = BIG_RAISE
Endif
Endif
endif
a. SMALL_RAISE
b. MEDIUM_RAISE [department 8 executes on less than 14 and does not have a chance to reach the ,9 option]
c. BIG_RAISE
d. Impossible to tell
b. MEDIUM_RAISE [department 8 executes on less than 14 and does not have a chance to reach the ,9 option]
16. In the following pseudocode, what percentage raise will an employee in department 10 receive?
If department < 2 then
Raise = SMALL_RAISE
Else
If department is < 6 then
Raise = MEDIUM RAISE
Else
If department < 10 then
Raise = BIG_RAISE
Endif
Endif
endif
a. SMALL_RAISE
b. MEDIUM_RAISE
c. BIG_RAISE
d. Impossible to tell [Department 10 is not < 10, therefore no match is made]
d. Impossible to tell [Department 10 is not < 10, therefore no match is made]
17. When you use a range check, you compare a variable to the _____________ value in the range
a. Lowest
b. Middle
c. Highest
d. Lowest or highest
d. Lowest or highest
18. If sales = 100, rate = .10 and expenses = 50, which of the following expressions is true?
a. Sales => expenses AND rate < 1
b. Sales < 200 OR expenses < 100
c. Expenses = rate OR sales = rate
d. Two of the above
a. Sales => expenses AND rate < 1
b. Sales < 200 OR expenses < 100
d. Two of the above
19. If a is true, and c is false, which of the following expressions is true
a. a OR b AND c
b. a AND b AND c
c. a AND b or C
d. two of the above
c. a AND b or C
20. If d is true, e is false, and f is false, which of the following expressions is true
a. e OR f AND d
b. f AND d OR e
c. d OR e AND f
d. two of the above
c. d OR e AND f