Chapter 3 Flashcards
1
Q
4 properties of decrementing function
A
- maps a set of program variables into an integer 2.when the loop is entered its value is nonnegative 3. when its value is <=0 , the loop terminates 4. its value s decreased everytime through the loop
2
Q
exhaustive enumeration
A
enumerates all possibilities until the answer is found or all possible solutions are exhausted
3
Q
for loop syntax
A
for < identifier> in :
4
Q
for loop
A
identifier bound to first value in sequence –execute code block– then identifier bound to next in sequence –until sequence completed or break
5
Q
range function
A
range(start, stop, stepsize)