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

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

Correct Answer

verifed

verified

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


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

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

Correct Answer

verifed

verified

When using the _____ operator, one or both subexpressions must bet for the compound expression to bet.


A) Or
B) And
C) Not
D) Maybe

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

Correct Answer

verifed

verified

Boolean variables are commonly used as _______________ to indicate whether a specific condition exists.

Correct Answer

verifed

verified

A(n) _______________ expression is made up of two or more Boolean expressions.

Correct Answer

verifed

verified

The Python language is not sensitive to block structuring of code.

A) True
B) False

Correct Answer

verifed

verified

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

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

The decision structure that has two possible paths of execution is known as _____.


A) single alternative
B) double alternative
C) dual alternative
D) two alternative

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

Correct Answer

verifed

verified

The _______________ statement is used to create a decision structure.

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) All of the above
F) C) and D)

Correct Answer

verifed

verified

Which logical operators perform short-circuit evaluation?


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

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

Correct Answer

verifed

verified

Expressions that are tested by the if statement are called Boolean expressions.

A) True
B) False

Correct Answer

verifed

verified

What is the result of the following Boolean expression, if x equals 5, y equals 3, and z equals 8? x < y or z > x


A) t
B) false
C) 8
D) 5

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

Correct Answer

verifed

verified

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

A) True
B) False

Correct Answer

verifed

verified

Showing 21 - 35 of 35

Related Exams

Show Answer