Page 15 - think python 2
P. 15

Contents xv
 5 Conditionals and recursion 39
5.1 Floordivisionandmodulus ........................... 39
5.2 Booleanexpressions................................ 40
5.3 Logicaloperators ................................. 40
5.4 Conditional execution
5.5 Alternative execution .
5.6 Chained conditionals .
5.7 Nested conditionals . .
5.8 Recursion........
5.9 Stackdiagramsforrecursivefunctions..................... 44
5.10 Infiniterecursion ................................. 44
5.11 Keyboardinput .................................. 45
5.12 Debugging..................................... 46
5.13 Glossary ...................................... 47
5.14 Exercises ...................................... 47
.............................. 41 .............................. 41 .............................. 41 .............................. 42 .............................. 43
6 Fruitful functions 51
6.1 Returnvalues ................................... 51
6.2 Incrementaldevelopment ............................ 52
6.3 Composition.................................... 54
6.4 Booleanfunctions................................. 54
6.5 Morerecursion................................... 55
6.6 Leapoffaith.................................... 57
6.7 Onemoreexample ................................ 57
6.8 Checkingtypes .................................. 58
6.9 Debugging..................................... 59
6.10 Glossary ...................................... 60
6.11 Exercises ...................................... 60






































































   13   14   15   16   17