CSC-1110 Quiz 3

Ace your homework & exams now with Quizwiz!

In Python the ________ symbol is used as the equality operator. A) == B) <> C) != D) <=

A) ==

In Python the ________ symbol is used as the not-equal-to operator. A) <= B) != C) == D) <>

B) !=

Which of the following is the correct if clause to determine whether choice is anything other than 10? A) if choice <> 10: B) if choice != 10: C) if not(choice < 10 and choice > 10): D) if choice != 10

B) if choice != 10:

What does the following expression mean?x <= y A) x is less than y B) x is greater than or equal to y C) x is less than or equal to y D) x is greater than y

C) x is less than or equal to y

When using the ________ logical operator, both subexpressions must be true for the compound expression to be true. A) or B) either or or and C) not D) and

D) and

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

False

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

False

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

False

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

False

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

False

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

False

What is the result of the following Boolean expression, given that x = 5, y = 3, and z = 8? x < y and z > x A) True B) False C) 8 D) 5

False

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

True

Decision structures are also known as selection structures.

True

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

True


Related study sets

Amino Acid Catabolism: Urea Cycle

View Set

EXAM FX life Texas life insurance practice test

View Set

MSN: Ch 62: Caring for Clients with Traumatic Musculoskeletal Injuries

View Set