Exam 3: Loops and Selection Statements
Exam 1: Introduction50 Questions
Exam 2: Software Development Data Types and Expressions50 Questions
Exam 3: Loops and Selection Statements50 Questions
Exam 4: Strings and Text Files50 Questions
Exam 5: Lists and Dictionaries50 Questions
Exam 6: Design With Functions50 Questions
Exam 7: Simple Graphics and Image Processing50 Questions
Exam 8: Graphical User Interrfaces50 Questions
Exam 9: Design With Classes50 Questions
Exam 10: Multithreading Networks and Client Server Programming50 Questions
Exam 11: Searching Sorting and Complexity Analysis51 Questions
Select questions type
A condition expresses a hypothesis about the state of its world at that point in time.
Free
(True/False)
4.8/5
(33)
Correct Answer:
True
Inside of a loop, after a termination condition has been met, what statement can be used to cause an exit from the loop and execute the remainder of the script?
Free
(Multiple Choice)
4.8/5
(40)
Correct Answer:
B
A while loop can be used for a count-controlled loop.
Free
(True/False)
4.7/5
(38)
Correct Answer:
True
Simple Boolean expressions consist of the Boolean values True or False, variables bound to those values, function calls that return Boolean values, or comparisons.
(True/False)
4.8/5
(37)
Assuming that the value of x is 4, and the value of y is 6, what is the value of the following expression? (x - y)**2 > y
(Multiple Choice)
4.7/5
(40)
When using the range function, what effect does the specification of a third argument have?
(Multiple Choice)
4.7/5
(35)
An off-by-one error is an example of what type of error in programming?
(Multiple Choice)
4.7/5
(38)
The or operator returns True if and only if both of its operands are true, and returns False otherwise.
(True/False)
4.9/5
(30)
In a conditional iteration loop, such as a while loop, what is a sentinel value?
(Multiple Choice)
4.8/5
(40)
The augmented assignment operations have a higher precedence than the standard assignment operation.
(True/False)
4.8/5
(36)
The use of +=, -=, and *= are all examples of what type of operators?
(Multiple Choice)
4.9/5
(38)
The if-else statement is the most common type of selection statement.
(True/False)
4.8/5
(43)
What is the minimum number of spaces that should be used to create an indented statement?
(Multiple Choice)
4.7/5
(43)
For the most part, off-by-one errors result when the programmer incorrectly specifies the lower bound of the loop.
(True/False)
4.9/5
(37)
Showing 1 - 20 of 50
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)