Filters
Question type

Study Flashcards

Which of the following is the correct if clause to determine whether y is in the range 10 through 50?


A) if 10 < y or y > 50
B) if 10 > y and y < 50
C) if y > 10 and y < 50
D) if y > 10 or y < 50

Correct Answer

verifed

verified

Python allows you to compare strings, but it is not case sensitive.

Correct Answer

verifed

verified

Nested decision structures are one way to test more than one condition.

Correct Answer

verifed

verified

What does the following expression mean? X <= y


A) x is less than y
B) x is less than or equal to y
C) x is greater than y
D) x is greater than or equal to y

Correct Answer

verifed

verified

In Python, the _____ symbol is used as the not-equal-to operator.


A) ==
B) <>
C) <=
D) !=

Correct Answer

verifed

verified

Which of the following is the correct if clause to use to determine whether choice is other than 10?


A) if choice != 10:
B) if choice != 10
C) if choice <> 10:
D) if choice <> 10

Correct Answer

verifed

verified

Python uses the same symbols for the assignment operator and the equality operator.

Correct Answer

verifed

verified

Short-circuit evaluation is performed with the not operator.

Correct Answer

verifed

verified

When using the _____ operator, both subexpressions must be true for the compound expression to be true.


A) or
B) and
C) not
D) maybe

Correct Answer

verifed

verified

Multiple Boolean expressions can be combined by using a logical operator to create _____ expressions.


A) sequential
B) logical
C) compound
D) mathematical

Correct Answer

verifed

verified

A(n) _____ structure is a logical design that controls the order in which a set of statements execute.


A) function
B) control
C) sequence
D) iteration

Correct Answer

verifed

verified

A Boolean variable can reference one of two values: _____.


A) yes or no
B) true or false
C) T or F
D) Y or N

Correct Answer

verifed

verified

An action in a single alternative decision structure is performed only when the condition is true.

Correct Answer

verifed

verified

The logical _______________ operator reverses the truth of a Boolean expression.

Correct Answer

verifed

verified

A(n) _______________ statement will execute one block of statements if its condition is true, or another block if its condition is false.

Correct Answer

verifed

verified

Showing 21 - 35 of 35

Related Exams

Show Answer