Filters
Question type

Study Flashcards

Most programming languages allow you to combine as many AND and OR operators in an expression as you need.

A) True
B) False

Correct Answer

verifed

verified

Which of the following pseudocode selects all people over 21?


A) if age >= 20 then
B) if age > 20 then
C) if age Not < 21 then
D) if age > 21 then

E) B) and C)
F) B) and D)

Correct Answer

verifed

verified

C#,C++,C,and Java use the symbol ____ to represent the logical OR.


A) %%
B) &&
C) ||
D) **

E) A) and D)
F) A) and C)

Correct Answer

verifed

verified

In C++,Java,and C#,the ____ is the symbol used for the NOT operator.


A) at-symbol
B) exclamation point
C) underscore
D) tilde

E) C) and D)
F) B) and C)

Correct Answer

verifed

verified

A series of nested if statements is also called a ____ if statement.


A) connected
B) stacked
C) cascading
D) trailed

E) None of the above
F) B) and C)

Correct Answer

verifed

verified

When you use the OR operator,both of the listed conditions must be met for the resulting action to take place.

A) True
B) False

Correct Answer

verifed

verified

False

Case 1 The YumYum store sells ice cream. Single-scoops cost $2.00, double-scoops cost $2.80, and triple-scoops cost $3.50. -Double-scoop orders account for about 50 percent of the sales; single-scoop orders account for 30 percent and only 20 percent of sales are triple-scoops.When you write a program to determine sales based on scoop size,you can make the most efficient decision by asking first whether the scoop size is ____.


A) single
B) double
C) triple
D) does not mater

E) B) and C)
F) A) and D)

Correct Answer

verifed

verified

Case 1 The YumYum store sells ice cream. Single-scoops cost $2.00, double-scoops cost $2.80, and triple-scoops cost $3.50. -There is a $10 bonus for ice cream store workers that have more than $100 of sales on their shift and sell more than four triple-scoop servings.What pseudocode will select the workers that will earn a bonus?


A) if Sales > 100 OR tripleScoop > 4
B) if Sales > 100 OR tripleScoop >=4
C) if Sales > 100 AND tripleScoop < 4
D) if Sales > 100 AND tripleScoop > 4

E) A) and B)
F) B) and C)

Correct Answer

verifed

verified

Case 1 The YumYum store sells ice cream. Single-scoops cost $2.00, double-scoops cost $2.80, and triple-scoops cost $3.50. -There is a $10 bonus for ice cream store workers that have more than $100 of sales on their shift and sell more than four triple-scoop servings.During any one shift,there are many more workers selling more than four triple-scoop servings than workers having more than $100 in sales.When you write a program to determine bonuses,you can make the most efficient decision by first asking if workers had more than ____.


A) $100 dollars of sales
B) four triple scoop sales
C) four double scoop sales
D) four single scoop sales

E) All of the above
F) A) and D)

Correct Answer

verifed

verified

____ are diagrams used in mathematics and logic to help describe the truth of an entire expression based on the truth of its parts.


A) Truth diagrams
B) Truth matrix
C) Truth tables
D) Logic diagrams

E) A) and D)
F) None of the above

Correct Answer

verifed

verified

C

The conditional AND operator in Java,C++,and C# consists of ____.


A) %%
B) &&
C) ||
D) **

E) None of the above
F) A) and B)

Correct Answer

verifed

verified

B

A ____ is one that represents only one of two states,true or false.


A) Boolean expression
B) short-circuit evaluation
C) trivial expression
D) truth table

E) B) and D)
F) C) and D)

Correct Answer

verifed

verified

A ____ is created when you need to ask multiple questions before an outcome is determined.


A) compound condition
B) compound question
C) truth table
D) trivial expression

E) A) and B)
F) B) and C)

Correct Answer

verifed

verified

Write structured pseudocode to show the following: if the value in the studentGrade variable is greater than or equal to RANGE1 and less than RANGE2,move "OK" to outMessage. Significant declarations: string outMessage num studentGrade num RANGE1 = 0 num RANGE2 = 101

Correct Answer

verifed

verified

if studentGrade >= R...

View Answer

In an AND decision,it is more efficient to first ask the question that is less likely to be ____.


A) larger
B) Boolean
C) false
D) true

E) B) and C)
F) C) and D)

Correct Answer

verifed

verified

When you combine AND and OR operators,the AND operators take ____,meaning their Boolean values are evaluated first.


A) preference
B) priority
C) precedence
D) residence

E) C) and D)
F) None of the above

Correct Answer

verifed

verified

Case 1 The YumYum store sells ice cream. Single-scoops cost $2.00, double-scoops cost $2.80, and triple-scoops cost $3.50. -No matter how many scoops a customer chooses,when a customer also decides that they want the ice cream served in a cone,there is an additonal 50 cent charge.In order to correctly charge for the ice cream served in a cone,you would use a(n) ____.


A) OR
B) AND
C) NOT
D) > operand

E) C) and D)
F) A) and D)

Correct Answer

verifed

verified

When several decisions are based on the value of the same variable,many programming languages offer a shortcut called the ____ structure.


A) sequence
B) while
C) loop
D) case

E) B) and D)
F) C) and D)

Correct Answer

verifed

verified

Sometimes you want to take action when one or the other of two conditions is true,this type of compound condition is called a(n) ____ decision.


A) AND
B) OR
C) NOR
D) NOT

E) All of the above
F) None of the above

Correct Answer

verifed

verified

Case 1 The YumYum store sells ice cream. Single-scoops cost $2.00, double-scoops cost $2.80, and triple-scoops cost $3.50. -To most efficiently keep track of the sales for each of the three serving sizes,you would use ____.


A) three completely separate unnested if statements
B) nested if statements using AND logic
C) nested if statements using OR logic
D) four completely separate unnested if statements

E) A) and C)
F) C) and D)

Correct Answer

verifed

verified

Showing 1 - 20 of 50

Related Exams

Show Answer