You are about to loop through a list and count the items that pass a test. What should the counter start at before the loop?
A program loops through the list [5, 9, 3, 11] and keeps a running total, starting at 0. What is the total after the loop finishes?
Answer: ______________
Before totalling a list, what should the running total start at?
A counting loop adds 1 only when an item passes the test.
Circle one: True False
A loop counts how many items in the list [4, -7, 0, -2, 6, -5, -1] are negative, starting the counter at 0. What is the counter after the loop finishes?
In the list [3, 8, 15, 22, 6, 19], how many numbers are greater than 10?
Answer: ______________
A loop adds up every number in the list [15, 3, 8, 12, 5], starting the running total at 0. What is the final total?
Answer: ______________
Find the largest of 12, 45, 7, 39, 45 and 3 by checking each once.
Answer: ______________
A friend starts best-so-far at 0 for -8, -2, -15 and -4. What will the loop claim?
A loop sums the numbers in the list [2, 4, 6, 8, 10, 12], starting the running total at 0. What is the final total?
Answer: ______________