Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Document preview thumbnail
Preview 1 out of 4 pages
Exam (elaborations)

COMP 110 Exam 1 Questions With Correct Answers A+

Document preview thumbnail
Preview 1 out of 4 pages

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. - AnswerTrue The standard mode of control flow in our programs is linear, meaning statements are evaluated one after another after another. - AnswerTrue With an if-else statement, control flow can fork in one, or two, possible different directions. - AnswerTrue An if statement always requires a corresponding else. - AnswerFalse The condition of an if statement should always be a bool expression. - AnswerTrue When control reaches an if statement, and the condition evaluates to False, control will continue on into the then block. - AnswerFalse 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. - AnswerFalse It is possible to nest if-else statements inside of either the then block or the else block of other if- else statements. - AnswerIt 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. - AnswerTrue The while statement allows you to repeat a block of statements in your program. - AnswerTrue 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. - AnswerTrue You can name a variable while in your program without Python confusing your variable's name and the while keyword. - AnswerFalse The condition in the while statement's syntax must be a

Content preview

©Jason MacConnell 2025 ALL RIGHTS RESERVED.




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

Document information

Uploaded on
January 4, 2025
Number of pages
4
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers
$10.99

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
StarGuide
4.3
(4)
Sold
21
Followers
0
Items
2588
Last sold
2 months ago



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions