Filters
Question type

Study Flashcards

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

Correct Answer

verifed

verified

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

A) True
B) False

Correct Answer

verifed

verified

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

A) True
B) False

Correct Answer

verifed

verified

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

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

Correct Answer

verifed

verified

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


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

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

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

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

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

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

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

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

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

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

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

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

Correct Answer

verifed

verified

Short-circuit evaluation is performed with the not operator.

A) True
B) False

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

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

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

Correct Answer

verifed

verified

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

A) True
B) False

Correct Answer

verifed

verified

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

A) True
B) False

Correct Answer

verifed

verified

Showing 21 - 35 of 35

Related Exams

Show Answer