chapter 3 CSC121

Your page rank:

Total word count: 505
Pages: 2

Calculate the Price

- -
275 words
Looking for Expert Opinion?
Let us have a look at your work and suggest how to improve it!
Get a Consultant

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

False

The if statement causes one or more statements to execute only when a Boolean expression is true.

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

False

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

True

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

False

The not operator is a unary operator which must be used in a compound expression.

False

Short -circuit evaluation is only performed with the not operator.

False

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

True

Decision structures are also known as selection structures.

True

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

True

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

dual alternative

Which logical operators perform short-circuit evaluation?

or, and

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

if y >= 10 and y <= 50:

A Boolean variable can reference one of two values which are

True or False

What is the result of the following Boolean expression, given that x = 5, y = 3, and z = 8?

x &lt; y or z &gt; x

True

What is the result of the following Boolean expression, given that x = 5, y = 3, and z = 8?

x &lt; y and z &gt; x

False

What is the result of the following Boolean expression, given that x = 5, y = 3, and z= 8?

not (x &lt; y or z &gt; x) and y &lt; z

False

What does the following expression mean?

x &lt;= y

x is less than or equal to y

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

if choice != 10:

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

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

The __________ statement is used to create a decision structure.

if

In flowcharting, the _______ symbol is used to represent a Boolean expression.

diamond

A(n) _______ decision structure provides only one alternative path of execution.

single alternative

In a decision structure, the action is ______ executed because it is performed only when a specific condition is true.

conditionally

A(n) ______ operator determines whether a specific relationship exists between two values.

relational

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

if-else

Python provides a special version of a decision structure known as the ________ statement, which makes the logic of the nested decision structure simpler to write.

if-elif-else

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

not

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

flags

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

compound

Share This
Flashcard

More flashcards like this

NCLEX 10000 Integumentary Disorders

When assessing a client with partial-thickness burns over 60% of the body, which finding should the nurse report immediately? a) ...

Read more

NCLEX 300-NEURO

A client with amyotrophic lateral sclerosis (ALS) tells the nurse, "Sometimes I feel so frustrated. I can’t do anything without ...

Read more

NASM Flashcards

Which of the following is the process of getting oxygen from the environment to the tissues of the body? Diffusion ...

Read more

Unfinished tasks keep piling up?

Let us complete them for you. Quickly and professionally.

Check Price

Successful message
sending