6.8. Glossary¶
- Accumulator¶
A variable used in a loop to add up or accumulate a result.
- Loop Counter¶
A variable used in a loop to count the number of times something happened. We initialize a counter to zero then increment the counter each time we want to “count” something.
- Decrement¶
To decrease the value of a variable (often by one).
- Initialize¶
To give an initial value to a variable that will be updated.
- Increment¶
To increase the value of a variable (often by one).
- Infinite Loop¶
A loop in which the terminating condition is never satisfied or for which there is no terminating condition.
- Iteration¶
One repeated execution of a set of statements using either a function that calls itself or a loop.
-
Q-1: Match the terms on the left with their defintions on the right.
If you're stuck, look above for the definitions of these terms! Try again.
- accumulator
- A variable used in a loop to add up or accumulate a result.
- loop counter
- A variable used in a loop to count the number of times something happened. We initialize a counter to zero and then increment the counter each time we want to "count" something.
- decrement
- To decrease the value of a variable (often by one).
- increment
- To increase the value of a variable (often by one).
Before you keep reading...
Making great stuff takes time and $$. If you appreciate the book you are reading now and want to keep quality materials free for other students please consider a donation to Runestone Academy. We ask that you consider a $10 donation, but if you can give more thats great, if $10 is too much for your budget we would be happy with whatever you can afford as a show of support.
-
Q-2: Match the terms on the left with their defintions on the right.
If you're stuck, look above for the definitions of these terms! Try again.
- initialize
- To give an initial value to a variable that will be updated.
- infinite loop
- A loop in which the terminating condition is never satisfied or for which there is no terminating condition.
- iteration
- One repeated execution of a set of statements using either a function that calls itself or a loop.