Exam 3: Control Structures

arrow
  • Select Tags
search iconSearch Question
  • Select Tags

All if statements must include an else header.

(True/False)
4.7/5
(40)

All relational operators produce a Boolean result (value).

(True/False)
4.9/5
(32)

Give an appropriate expression for each of the following: -To determine if the name 'Charles' appears in a list called names.

(Short Answer)
4.9/5
(41)

Evaluate the following Python expressions for the variable assignments given. Evaluate the following Python expressions for the variable assignments given.    -num1 > num2 and flag1 -num1 > num2 and flag1

(True/False)
4.9/5
(37)

The following code is an example of The following code is an example of

(Multiple Choice)
4.8/5
(34)

Which of the three forms of control flow is implicit in a program?

(Short Answer)
4.8/5
(38)

What are the three forms of control flow provided by programming languages?

(Short Answer)
4.7/5
(36)

Multiway selection in Python can be implemented as

(Multiple Choice)
4.9/5
(34)

Boolean literals True and False are considered Boolean expressions.

(True/False)
4.7/5
(44)

Control flow refers to

(Multiple Choice)
4.8/5
(32)

The elif header provides a convenient means of using a single if statement for multiway selection that can always be implemented instead by use of nested if statements.

(True/False)
4.9/5
(43)

"Control structure" is another name for a control statement.

(True/False)
4.7/5
(31)

Multiway selection in Python can be constructed either by the use of a single if statement (with the use of multiple headers), or by the construction of a set of __________ if statements.

(Short Answer)
4.8/5
(37)

The Boolean operators in Python are _____, _____, and _____.

(Short Answer)
4.9/5
(44)

Which form of control flow repeatedly executes a set of instructions?

(Short Answer)
4.8/5
(36)

Examine the following lines of code: While True: Print('Hello World!') This is an example of

(Multiple Choice)
4.7/5
(33)

Both the Boolean and _____________ operators evaluate to a Boolean result.

(Short Answer)
5.0/5
(43)

Most programs are straight-line programs.

(True/False)
4.9/5
(36)

A definite loop is a loop that always executes at least once, whereas an indefinite loop is a loop that may or not execute at all.

(True/False)
4.8/5
(34)

Fill in the table, evaluating the Boolean expressions for x and y with the given values. Some have already been filled in.

(Essay)
4.8/5
(32)
Showing 21 - 40 of 129
close modal

Filters

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