正在加载图片...
Contents 2.8 Chapter Summary .45 2.9 Exercises .46 Chapter 3 Computing with Numbers 51 3.1 Numeric Data Types.... 51 3.2 Using the Math Library… .55 3.3 Accumulating Results:Factorial....... 58 3.4 The Limits of Int......... 61 3.5 Handling Large Numbers:Long Ints... 64 3.6 Type Conversions... 66 3.7 Chapter Summary 68 3.8 Exercises.… 69 Chapter 4 Computing with Strings 77 4.1 The String Data Type......... 77 4.2 Simple String Processing...... 82 4.3 Strings,Lists,and Sequences. 85 4.4 Strings and Secret Codes.. 87 4.4.1 String Representation.. 87 4.4.2 Programming an Encoder 89 4.4.3 Programming a Decoder........ 90 4.4.4 Other String Operations..... 94 4.4.5 From Encoding to Encryption............ 95 4.5 Input/Output as String Manipulation. 4.5.1 Example Application:Date Conversion 97 4.5.2 String F0 matting… 102 4.5.3 Better Change Counter. 104 4.6 File Processing.. 106 4.6.1 Multi-Line Strings.............. 106 4.6.2 File Processing........ 107 4.6.3 Example Program:Batch Usernames........ 111 4.6.4 Coming Attraction:Objects............. 112 4.7 Chapter Summary............. .113 4.8 Exercises 115 Chapter 5 Objects and Graphics 123 5.1 Overview 123 5.2 The Object of Objects................ 124 5.3 Simple Graphics Programming............ 125 5.4 Using Graphical Objects............ 129 5.5 Graphing Future Value......... 135 5.6 Choosing Coordinates.......... 143 5.7 Interactive Graphics.................. 146 5.7.1 Getting Mouse Clicks....... 146 5.7.2 Handling Textual Input..... 148iv Contents 2.8 Chapter Summary 45 2.9 Exercises 46 Chapter 3 Computing with Numbers 51 3.1 Numeric Data Types 51 3.2 Using the Math Library 55 3.3 Accumulating Results: Factorial 58 3.4 The Limits of Int 61 3.5 Handling Large Numbers: Long Ints 64 3.6 Type Conversions 66 3.7 Chapter Summary 68 3.8 Exercises 69 Chapter 4 Computing with Strings 77 4.1 The String Data Type 77 4.2 Simple String Processing 82 4.3 Strings, Lists, and Sequences 85 4.4 Strings and Secret Codes 87 4.4.1 String Representation 87 4.4.2 Programming an Encoder 89 4.4.3 Programming a Decoder 90 4.4.4 Other String Operations 94 4.4.5 From Encoding to Encryption 95 4.5 Input/Output as String Manipulation 97 4.5.1 Example Application: Date Conversion 97 4.5.2 String Formatting 102 4.5.3 Better Change Counter 104 4.6 File Processing 106 4.6.1 Multi-Line Strings 106 4.6.2 File Processing 107 4.6.3 Example Program: Batch Usernames Ill 4.6.4 Coming Attraction: Objects 112 4.7 Chapter Summary 113 4.8 Exercises 115 Chapter 5 Objects and Graphics 123 5.1 Overview 123 5.2 The Object of Objects 124 5.3 Simple Graphics Programming 125 5.4 Using Graphical Objects 129 5.5 Graphing Future Value 135 5.6 Choosing Coordinates 143 5.7 I nteractive Gra phics 146 5.7.1 Getting Mouse Clicks 146 5.7.2 Handling Textual Input 148
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有