MCQ Questions
Q.1.
expression is made up of two or more Boolean expressions.
  • 0%
    compound
  • 0%
    relational
  • 0%
    not, and
  • 0%
    Diamond
Q.2.
The logical _______________ operator reverses the truth of a Boolean expression.
  • 0%
    true
  • 0%
    False
  • 0%
    not
  • 0%
    or
Q.3.
Expressions that are tested by the if statement are called Boolean expressions.T/F
  • 0%
    True
  • 0%
    False
Q.4.
An action in a single alternative decision structure is performed only when the condition is true.T/F
  • 0%
    True
  • 0%
    False
Q.5.
The decision structure that has two possible paths of execution is known as
  • 0%
    Single alternative
  • 0%
    conditionally
  • 0%
    relational
  • 0%
    Dual alternative
Q.6.
executed because it is performed only when a specific condition is true.
  • 0%
    relational
  • 0%
    conditionally
  • 0%
    Single alternative
  • 0%
    Dual alternative
Q.7.
Which logical operators perform short-circuit evaluation?
  • 0%
    Compound
  • 0%
    Diamond
  • 0%
    not, and
  • 0%
    not
Q.8.
Short -circuit evaluation is only performed with the not operator.T/F
  • 0%
    True
  • 0%
    False
Q.9.
The turtle.isdown() function returns _____________ if the turtle's pen is down.
  • 0%
    not
  • 0%
    relational
  • 0%
    true
  • 0%
    False
Q.10.
In Python the ________ symbol is used as the not-equal-to operator.
  • 0%
    !=
  • 0%
    or
  • 0%
    False
  • 0%
    ==
Q.11.
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.
  • 0%
    True/False
  • 0%
    False
  • 0%
    if-elif-else
  • 0%
    if choice != 10:
Q.12.
A(n) ________ structure is a logical design that controls the order in which a set of statements execute.
  • 0%
    Compound
  • 0%
    True
  • 0%
    if-else
  • 0%
    control
Q.13.
In Python the ________ symbol is used as the equality operator.
  • 0%
    ==
  • 0%
    if
  • 0%
    False
  • 0%
    !=
Q.14.
Nested decision statements are one way to test more than one condition.T/F
  • 0%
    True
  • 0%
    False
Q.15.
Which of the following will hide the turtle if it is visible?
  • 0%
    if turtle.isvisible(): turtle.hideturtle()
  • 0%
    if not(turtle.isdown()): turtle.pendown()
  • 0%
    if choice != 10:
  • 0%
    not, and
Q.16.
The Python language is not sensitive to block structuring of code.T/F
  • 0%
    True
  • 0%
    False
Q.17.
decision structure provides only one alternative path of execution.
  • 0%
    Dual alternative
  • 0%
    True
  • 0%
    conditionally
  • 0%
    Single alternative
Q.18.
When using the ________ logical operator, both subexpressions must be true for the compound expression to be true.
  • 0%
    False
  • 0%
    and
  • 0%
    not
  • 0%
    True
Q.19.
The following code snippet will change the turtle's pen size to 4 if it is presently less than 4:if turtle.pensize() < 4:turtle.pensize(4)T/F
  • 0%
    True
  • 0%
    False
Q.20.
Boolean variables are commonly used as _______________ to indicate whether a specific condition exists.
  • 0%
    True/False
  • 0%
    False
  • 0%
    if-else
  • 0%
    flags
Q.21.
Decision structures are also known as selection structures.T/F
  • 0%
    True
  • 0%
    False
Q.22.
Multiple Boolean expressions can be combined by using a logical operator to create ________ expressions.
  • 0%
    control
  • 0%
    not, and
  • 0%
    Compound
  • 0%
    if-else
Q.23.
symbol is used to represent a Boolean expression.
  • 0%
    compound
  • 0%
    Diamond
  • 0%
    False
  • 0%
    not, and
Q.24.
Which of the following will determine if the turtle's pen is up and will change it to down if that is the case?
  • 0%
    if not(turtle.isdown()): turtle.pendown()
  • 0%
    if choice != 10:
  • 0%
    True
  • 0%
    if turtle.isvisible(): turtle.hideturtle()
Q.25.
When using the ________ logical operator, one or both of the subexpressions must be true for the compound expression to be true.
  • 0%
    or
  • 0%
    not
  • 0%
    !=
  • 0%
    True