COMP 110 Exam 1 Questions With Correct
Answers A+
The "flow of control" or "control flow" in a program is the logic which governs what statement
the computer will evaluate next, in other words the order in which statements are evaluated. -
Answer✔True
The standard mode of control flow in our programs is linear, meaning statements are evaluated
one after another after another. - Answer✔True
With an if-else statement, control flow can fork in one, or two, possible different directions. -
Answer✔True
An if statement always requires a corresponding else. - Answer✔False
The condition of an if statement should always be a bool expression. - Answer✔True
When control reaches an if statement, and the condition evaluates to False, control will continue
on into the then block. - Answer✔False
The then and else blocks of an if-then statement are written at the same level of indentation as
the if keyword and else keyword. - Answer✔False
It is possible to nest if-else statements inside of either the then block or the else block of other if-
else statements. - Answer✔It is possible to nest if-else statements inside of either the then block
or the else block of other if-else statements.
After either the then block or else block completes, control continues to the next statement
following the if-else statement, which is written at the same level of indentation of the if-else
construct. - Answer✔True
The while statement allows you to repeat a block of statements in your program. - Answer✔True
The while statement is called a loop, because the control of your program jumps back up to a
point earlier in the program than the end of the repeat block. - Answer✔True
You can name a variable while in your program without Python confusing your variable's name
and the while keyword. - Answer✔False
The condition in the while statement's syntax must be a bool expression. - Answer✔True