Exam 3: Decision Structures and Boolean Logic

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

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

(Short Answer)
4.7/5
(38)

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

(Short Answer)
4.8/5
(36)

The following statement will check to see if the turtle's pen color is 'green': if turtle.pencolor()= 'green'

(True/False)
4.7/5
(34)

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

(Multiple Choice)
5.0/5
(31)

The turtle.isdown()function returns ___________ if the turtle's pen is down.

(True/False)
4.9/5
(36)

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)

(True/False)
4.8/5
(40)

Which of the following will determine if the turtle's pen is up and will change it to down if that is the case?

(Multiple Choice)
4.7/5
(32)

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

(Multiple Choice)
5.0/5
(34)

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

(True/False)
4.8/5
(43)

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

(Multiple Choice)
4.8/5
(35)

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

(True/False)
4.8/5
(31)

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

(Multiple Choice)
5.0/5
(41)

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

(Short Answer)
4.8/5
(35)

What does the following expression mean? X <= y

(Multiple Choice)
4.8/5
(36)

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

(Short Answer)
4.8/5
(35)

The ___________ statement is used to create a decision structure.

(Short Answer)
5.0/5
(38)

What is the result of the following Boolean expression,given that x = 5,y = 3,and z= 8? Not (x < y or z > x)and y < z

(Multiple Choice)
4.8/5
(38)

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

(True/False)
4.8/5
(43)

A(n)__________ structure is a logical design that controls the order in which a set of statements execute.

(Multiple Choice)
4.9/5
(47)

Which of the following will hide the turtle if it is visible?

(Multiple Choice)
4.9/5
(33)
Showing 21 - 40 of 40
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)