Ch 4
The variable used to keep the running total is called a(n) _____. Accumulator Total running total grand total
Accumulator
What type of loop structure repeats the code based on the value of the Boolean expression? Condition-controlled loop Number-controlled loop Count-controlled loop Boolean-controlled loop
Condition-controlled loop
What type of loop structure repeats the code a specific number of times? Condition-controlled loop Number-controlled loop Count-controlled loop Boolean-controlled loop
Count-controlled loop
_____ is the process of inspecting data that has been input to a program to make sure it is valid before it is used in a computation. Input validation Correcting data Data validation Correcting input
Input validation
The first input operation is called the _____, and its purpose is to get the first input value that will be tested by the validation loop. priming read first input loop set read loop validation
priming read
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. target variable loop variable for variable count variable
target variable
Which of the following represents an example to calculate the sum of the numbers (accumulator)? total + number = total number += number total += number total = number
total+=number
What is the format for the while clause in Python? while condition while condition: while condition statement while condition : statement
while condition:
In Python, a comma-separated sequence of data items that are enclosed in a set of brackets is called a _____. sequence variable Value List
List
What is the structure that causes a statement or a set of statements to execute repeatedly? Sequence Decision Module Repetition
Repetition