Exam 5: Repetition Structures
Exam 1: Introduction to Computers and Programming35 Questions
Exam 2: Input, Processing, and Output35 Questions
Exam 3: Simple functions34 Questions
Exam 4: Decision Structures and Boolean Logic35 Questions
Exam 5: Repetition Structures35 Questions
Exam 6: Value-Returning functions and Modules35 Questions
Exam 7: files and Exceptions35 Questions
Exam 8: Lists and Tuples35 Questions
Exam 9: More About Strings35 Questions
Exam 10: Dictionaries and Sets35 Questions
Exam 11: Classes and Object-Oriented Programming35 Questions
Exam 12: Inheritance35 Questions
Exam 13: Recursion35 Questions
Exam 14: GUI Programming35 Questions
Select questions type
The integrity of a program's output is only as good as the integrity of its input. for this reason the program should discard input that is invalid and prompt the user to enter correct data.
Free
(True/False)
4.8/5
(36)
Correct Answer:
True
The while loop is known as a(n) _______________ loop because it tests conditions before performing an iteration.
Free
(Short Answer)
4.9/5
(33)
Correct Answer:
pretest
In Python, an infinite loop usually occurs when the computer accesses the wrong memory address.
Free
(True/False)
4.9/5
(34)
Correct Answer:
False
A(n) _______________ is a special value that marks the end of a sequence of items.
(Short Answer)
4.9/5
(37)
What are the values that the variable num contains through the iterations of the following for loop? for num in range(4)
(Multiple Choice)
4.9/5
(40)
What is the structure that causes a statement or a set of statements to execute repeatedly?
(Multiple Choice)
4.9/5
(33)
When will the following loop terminate? while keep_on_going != 999 :
(Multiple Choice)
4.9/5
(34)
Which of the following represents an example to calculate the sum of the numbers (accumulator)?
(Multiple Choice)
4.8/5
(43)
The _______________ function is a built-in function that generates a list of integer values.
(Short Answer)
4.7/5
(40)
To get the total number of iterations of a nested loop, multiply the number of iterations of all the loops.
(True/False)
4.9/5
(45)
In Python, a comma-separated sequence of data items that are enclosed in a set of brackets is called a _____.
(Multiple Choice)
4.9/5
(31)
In Python, the variable in the for clause is referred to as the _____ because it is the target of an assignment at the beginning of each loop iteration.
(Multiple Choice)
4.9/5
(36)
In Python, you would use the _______________ statement to write a count-controlled loop.
(Short Answer)
4.9/5
(42)
In a nested loop, the inner loop goes through all of its iterations for every single iteration of an outer loop.
(True/False)
4.9/5
(36)
A(n) _______________-controlled loop causes a statement or set of statements to repeat as long as a condition ist.
(Short Answer)
4.8/5
(31)
Both of the following for clauses would generate the same number of loop iterations:
for num in range(4):
for num in range(1,5):
(True/False)
4.9/5
(31)
A(n) _______________ structure causes a statement or set of statements to execute repeatedly.
(Short Answer)
4.8/5
(45)
In flowcharting, the decision structure and the repetition structure both use the diamond symbol to represent the condition that is tested.
(True/False)
4.9/5
(31)
What type of loop structure repeats the code a specific number of times?
(Multiple Choice)
4.8/5
(37)
Showing 1 - 20 of 35
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)