Page 13 - think python 2
P. 13
Contents
Preface v
1 The way of the program 1
1.1 Whatisaprogram?................................ 1
1.2 RunningPython.................................. 2
1.3 Thefirstprogram ................................. 3
1.4 Arithmeticoperators ............................... 3
1.5 Valuesandtypes ................................. 4
1.6 Formalandnaturallanguages.......................... 4
1.7 Debugging..................................... 6
1.8 Glossary ...................................... 6
1.9 Exercises...................................... 7
2 Variables, expressions and statements 9
2.1 Assignmentstatements.............................. 9
2.2 Variablenames .................................. 9
2.3 Expressionsandstatements ........................... 10
2.4 Scriptmode .................................... 11
2.5 Orderofoperations................................ 12
2.6 Stringoperations ................................. 12
2.7 Comments..................................... 13
2.8 Debugging..................................... 13
2.9 Glossary ...................................... 14
2.10 Exercises ...................................... 15