副标题:无

作   者:

分类号:

ISBN:9781598631128

微信扫一扫,移动浏览光盘

简介

Summary: Publisher Summary 1 Presents an introduction to the concepts of the Python computer language.   Publisher Summary 2 Ready to learn Python programming? Are you new to programming with Python? Do you need a solid introduction to the fundamental concepts? You've found it in "Python Programming for the Absolute Beginner, Second Edition," the updated version of the successful "Python Programming for the Absolute Beginner." As part of the for the absolute beginner series developed by computer science instructors exclusively for Cengage Learning Course Technology PTR, this book will teach you the basics of Python programming through simple game creation. You can then take the skills you learn and use them for more practical Python programming applications and real-world programming scenarios. Better still, by the time you finish this book you will be able to apply the basic principles you've learned to the next programming language you tackle. Create simple, fun games while you learn to program with Python.   Publisher Summary 3 Python is the ideal first language for anyone who wants to learn programming. "Python Programming for the Absolute Beginner, Second Edition" teaches the art of programming using this powerful, flexible, and easy-to-use language and a step-by-step approach. The book provides an introduction to programming and also moves on to more advanced topics such as data structures, file handling, exceptions, object oriented programming, and graphics. Topics are taught using example programs and games-based end-of-chapter projects tie together all of the new topics presented. Readers are encouraged to challenge themselves with additional chapter projects that will have them programming on their own. "Python Programming for the Absolute Beginner, Second Edition鈥?makes programming fun and easy.  

目录

Table Of Contents:

Getting Started: The Game Over Program 1(16)

Examining the Game Over Program 2(1)

Introducing Python 3(2)

Python Is Easy to Use 3(1)

Python Is Powerful 3(1)

Python Is Object Oriented 4(1)

Python Is a ``Glue'' Language 4(1)

Python Runs Everywhere 4(1)

Python Has a Strong Community 4(1)

Python Is Free and Open Source 5(1)

Setting Up Python on Windows 5(1)

Installing Python on Windows 5(1)

Setting Up Python on Other Operating Systems 6(1)

Introducing the Python IDLE 7(5)

Programming in Interactive Mode 7(3)

Programming in Script Mode 10(2)

Back to the Game Over Program 12(3)

Using Comments 13(1)

Using Blank Lines 14(1)

Printing the String 14(1)

Waiting for the User 14(1)

Summary 15(2)

Types, Variables, and Simple I/O: The Useless Trivia Program 17(34)

Introducing the Useless Trivia Program 18(1)

Using Quotes with Strings 18(4)

Introducing the Game Over 2.0 Program 18(2)

Using Quotes inside Strings 20(1)

Continuing a Statement on the Next Line 20(1)

Creating Triple-Quoted Strings 21(1)

Using Escape Sequences with Strings 22(3)

Introducing the Fancy Credits Program 22(1)

Sounding the System Bell 23(1)

Moving Forward a Tab Stop 23(1)

Printing a Backslash 23(1)

Inserting a Newline 24(1)

Inserting a Quote 24(1)

Concatenating and Repeating Strings 25(3)

Introducing the Silly Strings Program 25(1)

Concatenating Strings 26(1)

Suppressing a Newline 27(1)

Repeating Strings 27(1)

Working with Numbers 28(4)

Introducing the Word Problems Program 28(2)

Understanding Numeric Types 30(1)

Using Mathematical Operators 30(2)

Understanding Variables 32(3)

Introducing the Greeter Program 32(1)

Creating Variables 33(1)

Using Variables 34(1)

Naming Variables 34(1)

Getting User Input 35(2)

Introducing the Personal Greeter Program 35(1)

Using the raw_input() Function 36(1)

Using String Methods 37(3)

Introducing the Quotation Manipulation Program 37(1)

Creating New Strings with String Methods 38(2)

Using the Right Types 40(3)

Introducing the Trust Fund Buddy-Bad Program 41(1)

Tracking Down Logical Errors 42(1)

Converting Values 43(4)

Introducing the Trust Fund Buddy-Good Program 43(1)

Converting Strings to Integers 44(1)

Using Augmented Assignment Operators 45(1)

Printing Strings and Numbers Together 46(1)

Back to the Useless Trivia Program 47(2)

Creating the Initial Comments 47(1)

Getting the User Input 47(1)

Printing Lowercase and Uppercase Versions of name 48(1)

Calculating dog_years 48(1)

Calculating seconds 48(1)

Printing name Five Times 49(1)

Calculating moon_weight and sun_weight 49(1)

Waiting for the User 49(1)

Summary 49(2)

Branching, while Loops, and Program Planning: The Guess My Number Game 51(38)

Introducing the Guess My Number Game 52(1)

Generating Random Numbers 52(3)

Introducing the Craps Roller Program 52(1)

Using the import Statement 53(1)

Accessing randrange() 54(1)

Using randrange() 54(1)

Using the if Structure 55(4)

Introducing the Password Program 55(1)

Examining the if Structure 56(1)

Creating Conditions 57(1)

Understanding Comparison Operators 57(1)

Using Indentation to Create Blocks 58(1)

Building Your Own if Structure 59(1)

Using the if-else Structure 59(2)

Introducing the Granted or Denied Program 59(1)

Examining the else Statement 60(1)

Using the if-elif-else Structure 61(4)

Introducing the Mood Computer Program 61(2)

Examining the if-elif-else Structure 63(2)

Creating while Loops 65(3)

Introducing the Three-Year-Old Simulator Program 65(1)

Examining the while Structure 66(1)

Initializing the Sentry Variable 67(1)

Checking the Sentry Variable 67(1)

Updating the Sentry Variable 68(1)

Avoiding Infinite Loops 68(4)

Introducing the Losing Battle Program 68(2)

Tracing the Program 70(1)

Creating Conditions That Can Become False 71(1)

Treating Values as Conditions 72(1)

Introducing the Maitre D' Program 72(1)

Interpreting Any Value as True or False 72(1)

Creating Intentional Infinite Loops 73(3)

Introducing the Finicky Counter Program 74(1)

Using the break Statement to Exit a Loop 74(1)

Using the continue Statement to Jump Back to the Top of a Loop 75(1)

Understanding When to Use break and continue 75(1)

Using Compound Conditions 76(6)

Introducing the Exclusive Network Program 76(3)

Understanding the not Logical Operator 79(1)

Understanding the and Logical Operator 80(1)

Understanding the or Logical Operator 81(1)

Planning Your Programs 82(1)

Creating Algorithms with Pseudocode 82(1)

Applying Stepwise Refinement to Your Algorithms 83(1)

Returning to the Guess My Number Game 83(3)

Planning the Program 84(1)

Creating the Initial Comment Block 85(1)

Importing the random Module 85(1)

Explaining the Game 85(1)

Setting the Initial Values 85(1)

Creating a Guessing Loop 86(1)

Congratulating the Player 86(1)

Waiting for the Player to Quit 86(1)

Summary 86(3)

for Loops, Strings, and Tuples: The Word Jumble Game 89(34)

Introducing the Word Jumble Game 90(1)

Using for Loops 90(2)

Introducing the Loopy String Program 90(1)

Understanding for Loops 91(1)

Creating a for Loop 92(1)

Counting with a for Loop 92(3)

Introducing the Counter Program 92(2)

Counting Forwards 94(1)

Counting by Fives 94(1)

Counting Backwards 95(1)

Using Sequence Operators and Functions with Strings 95(2)

Introducing the Message Analyzer Program 95(1)

Using the len() Function 96(1)

Using the in Operator 97(1)

Indexing Strings 97(4)

Introducing the Random Access Program 98(1)

Working with Positive Position Numbers 99(1)

Working with Negative Position Numbers 100(1)

Accessing a Random String Element 101(1)

Understanding String Immutability 101(2)

Building a New String 103(3)

Introducing the No Vowels Program 103(1)

Creating Constants 104(1)

Creating New Strings from Existing Ones 105(1)

Slicing Strings 106(4)

Introducing the Pizza Slicer Program 106(2)

Introducing None 108(1)

Understanding Slicing 108(1)

Creating Slices 109(1)

Using Slicing Shorthand 110(1)

Creating Tuples 110(4)

Introducing the Hero's Inventory Program 111(1)

Creating an Empty Tuple 112(1)

Treating a Tuple as a Condition 112(1)

Creating a Tuple with Elements 113(1)

Printing a Tuple 113(1)

Looping Through a Tuple's Elements 113(1)

Using Tuples 114(4)

Introducing the Hero's Inventory 2.0 114(1)

Setting Up the Program 115(1)

Using the len() Function with Tuples 115(1)

Using the in Operator with Tuples 116(1)

Indexing Tuples 116(1)

Slicing Tuples 116(1)

Understanding Tuple Immutability 117(1)

Concatenating Tuples 117(1)

Back to the Word Jumble Game 118(3)

Setting Up the Program 118(1)

Planning the Jumble Creation Section 119(1)

Creating an Empty Jumble String 119(1)

Setting Up the Loop 119(1)

Generating a Random Position in word 120(1)

Creating a New Version of jumble 120(1)

Creating a New Version of word 120(1)

Welcoming the Player 120(1)

Getting the Player's Guess 121(1)

Congratulating the Player 121(1)

Ending the Game 121(1)

Summary 121(2)

Lists and Dictionaries: The Hangman Game 123(36)

Introducing the Hangman Game 124(1)

Using Lists 125(5)

Introducing the Hero's Inventory 3.0 Program 125(1)

Creating a List 126(1)

Using the len() Function with Lists 127(1)

Using the in Operator with Lists 127(1)

Indexing Lists 127(1)

Slicing Lists 127(1)

Concatenating Lists 128(1)

Understanding List Mutability 128(1)

Assigning a New List Element by Index 128(1)

Assigning a New List Slice 129(1)

Deleting a List Element 129(1)

Deleting a List Slice 130(1)

Using List Methods 130(5)

Introducing the High Scores Program 130(1)

Setting Up the Program 131(1)

Displaying the Menu 131(1)

Existing the Program 132(1)

Displaying the Scores 132(1)

Adding a Score 132(1)

Removing a Score 133(1)

Sorting the Scores 133(1)

Reversing the Scores 134(1)

Dealing with an Invalid Choice 134(1)

Waiting for the User 134(1)

Understanding When to Use Tuples Instead of Lists 135(1)

Using Nested Sequences 135(5)

Introducing the High Scores 2.0 Program 135(1)

Creating Nested Sequences 136(1)

Accessing Nested Elements 137(1)

Unpacking a Sequence 138(1)

Setting Up the Program 138(1)

Displaying the Scores by Accessing Nested Tuples 139(1)

Adding a Score by Appending a Nested Tuple 139(1)

Dealing with an Invalid Choice 139(1)

Waiting for the User 140(1)

Understanding Shared References 140(2)

Using Dictionaries 142(8)

Introducing the Geek Translator Program 143(1)

Creating Dictionaries 143(1)

Accessing Dictionary Values 144(2)

Setting Up the Program 146(1)

Getting a Value 147(1)

Adding a Key-Value Pair 147(1)

Replacing a Key-Value Pair 148(1)

Deleting a Key-Value Pair 149(1)

Wrapping Up the Program 149(1)

Understanding Dictionary Requirements 150(1)

Back to the Hangman Game 150(7)

Setting Up the Program 151(1)

Creating Constants 151(3)

Initializing the Variables 154(1)

Creating the Main Loop 155(1)

Getting the Player's Guess 155(1)

Checking the Guess 156(1)

Ending the Game 156(1)

Summary 157(2)

Functions: The Tic-Tac-Toe Game 159(34)

Introducing the Tic-Tac-Toe Game 160(1)

Creating Functions 161(4)

Introducing the Instructions Program 161(2)

Defining a Function 163(1)

Documenting a Function 164(1)

Calling a Programmer-Created Function 164(1)

Understanding Abstraction 164(1)

Using Parameters and Return Values 165(4)

Introducing the Receive and Return Program 165(1)

Receiving Information through Parameters 166(1)

Returning Information through Return Values 167(1)

Understanding Encapsulation 167(1)

Receiving and Returning Values in the Same Function 168(1)

Understanding Software Reuse 169(1)

Using Keyword Arguments and Default Parameter Values 169(5)

Introducing the Birthday Wishes Program 170(1)

Using Positional Parameters and Positional Arguments 171(1)

Using Positional Parameters and Keyword Arguments 171(1)

Using Default Parameter Values 172(2)

Using Global Variables and Constants 174(4)

Understanding Scopes 174(1)

Introducing the Global Reach Program 175(1)

Reading a Global Variable from Inside a Function 176(1)

Shadowing a Global Variable from Inside a Function 177(1)

Changing a Global Variable from Inside a Function 177(1)

Understanding When to Use Global Variables and Constants 178(1)

Back to the Tic-Tac-Toe Game 178(3)

Planning the Tic-Tac-Toe Game 178(2)

Setting Up the Program 180(1)

The display_instruct() Function 181(1)

The ask_yes_no() Function 182(1)

The ask_number() Function 182(1)

The pieces() Function 183(1)

The new_board() Function 183(1)

The display_board() Function 183(1)

The legal_moves() Function 184(1)

The winner() Function 184(1)

The human_move( ) Function 185(1)

The computer_move() Function 186(3)

The next_turn() Function 189(1)

The congrat_winner() Function 189(1)

The main() Function 190(1)

Starting the Program 191(1)

Summary 191(2)

Files and Exceptions: The Trivia Challenge Game 193(28)

Introducing the Trivia Challenge Game 194(1)

Reading from Text Files 194(7)

Introducing the Read It Program 194(3)

Opening and Closing a Text File 197(1)

Reading Characters from a Text File 198(1)

Reading Characters from a Line 199(1)

Reading All Lines into a List 200(1)

Looping through a Text File 201(1)

Writing to a Text File 201(3)

Introducing the Write It Program 201(1)

Writing Strings to a Text File 202(1)

Writing a List of Strings to a Text File 203(1)

Storing Complex Data in Files 204(5)

Introducing the Pickle It Program 204(1)

Pickling Data and Writing It to a File 205(1)

Reading Data from a File and Unpickling It 206(1)

Using a Shelf to Store Pickled Data 207(2)

Using a Shelf to Retrieve Pickled Data 209(1)

Handling Exceptions 209(5)

Introducing the Handle It Program 210(1)

Using a try Statement with an except Clause 210(1)

Specifying an Exception Type 211(1)

Handling Multiple Exception Types 212(1)

Getting an Exception's Argument 213(1)

Adding an else Clause 214(1)

Back to the Trivia Challenge Game 214(6)

Understanding the Data File Layout 214(2)

The open_file() Function 216(1)

The next_line() Function 217(1)

The next_block() Function 217(1)

The welcome() Function 218(1)

Setting Up the Game 218(1)

Asking a Question 218(1)

Getting an Answer 219(1)

Checking an Answer 219(1)

Getting the Next Question 219(1)

Ending the Game 219(1)

Starting the main() Function 220(1)

Summary 220(1)

Software Objects: The Critter Caretaker Program 221(32)

Introducing the Critter Caretaker Program 222(1)

Understanding Object-Oriented Basics 223(1)

Creating Classes, Methods, and Objects 224(3)

Introducing the Simple Critter Program 224(1)

Defining a Class 225(1)

Defining a Method 226(1)

Instantiating an Object 226(1)

Invoking a Method 226(1)

Using Constructors 227(2)

Introducing the Constructor Critter Program 227(1)

Creating a Constructor 228(1)

Creating Multiple Objects 228(1)

Using Attributes 229(4)

Introducing the Attribute Critter Program 229(1)

Initializing Attributes 230(1)

Accessing Attributes 231(1)

Printing an Object 232(1)

Using Class Attributes and Static Methods 233(4)

Introducing the Classy Critter Program 233(2)

Creating a Class Attribute 235(1)

Accessing a Class Attribute 235(1)

Creating a Static Method 236(1)

Invoking a Static Method 236(1)

Understanding Object Encapsulation 237(1)

Using Private Attributes and Private Methods 237(5)

Introducing the Private Critter Program 237(1)

Creating Private Attributes 238(1)

Accessing Private Attributes 238(2)

Creating Private Methods 240(1)

Accessing Private Methods 240(1)

Respecting an Object's Privacy 241(1)

Understanding When to Implement Privacy 241(1)

Understanding New-Style and Old-Style Classes 242(1)

Controlling Attribute Access 242(4)

Introducing the Property Critter 242(1)

Using Get Methods 243(1)

Using Set Methods 244(1)

Using Properties 244(2)

Back to the Critter Caretaker Program 246(4)

The Critter Class 247(2)

Creating the Critter 249(1)

Creating a Menu System 249(1)

Starting the Program 250(1)

Summary 250(3)

Object-Oriented Programming: The Blackjack Game 253(38)

Introducing the Blackjack Game 254(1)

Sending and Receiving Messages 254(3)

Introducing the Alien Blaster Program 255(2)

Sending a Message 257(1)

Receiving a Message 257(1)

Combining Objects 257(4)

Introducing the Playing Cards Program 257(1)

Creating the Card Class 258(1)

Creating the Hand Class 259(1)

Using Card Objects 260(1)

Combining Card Objects Using a Hand Object 260(1)

Using Inheritance to Create New Classes 261(1)

Extending a Class through Inheritance 262(6)

Introducing the Playing Cards 2.0 Program 262(1)

Creating a Base Class 263(1)

Inheriting from a Base Class 264(1)

Extending a Derived Class 265(1)

Using the Derived Class 266(2)

Altering the Behavior of Inherited Methods 268(5)

Introducing the Playing Cards 3.0 Program 268(1)

Creating a Base Class 269(1)

Overriding Base Class Methods 269(1)

Invoking Base Class Methods 270(2)

Using the Derived Classes 272(1)

Understanding Polymorphism 273(1)

Creating Modules 273(4)

Introducing the Simple Game Program 273(1)

Writing Modules 274(1)

Importing Modules 275(1)

Using Imported Functions and Classes 276(1)

Back to the Blackjack Game 277(12)

The cards Module 277(2)

Designing the Classes 279(1)

Writing Pseudocode for the Game Loop 280(1)

Importing the cards and games Modules 281(1)

The BJ_Card Class 281(1)

The BJ_Deck Class 282(1)

The BJ_Hand Class 282(2)

The BJ_Player Class 284(1)

The BJ_Dealer Class 285(1)

The BJ_Game Class 285(3)

The main() Function 288(1)

Summary 289(2)

GUI Development: The Mad Lib Program 291(36)

Introducing the Mad Lib Program 292(2)

Examining a GUI 294(1)

Understanding Event-Driven Programming 295(1)

Using a Root Window 296(3)

Introducing the Simple GUI Program 296(2)

Importing the Tkinter Module 298(1)

Creating a Root Window 298(1)

Modifying a Root Window 298(1)

Entering a Root Window's Event Loop 299(1)

Using Labels 299(2)

Introducing the Labeler Program 299(1)

Setting Up the Program 299(1)

Creating a Frame 300(1)

Creating a Label 300(1)

Entering the Root Window's Event Loop 300(1)

Using Buttons 301(2)

Introducing the Lazy Buttons Program 301(1)

Setting Up the Program 301(1)

Creating Buttons 302(1)

Entering the Root Window's Event Loop 303(1)

Creating a GUI Using a Class 303(2)

Introducing the Lazy Buttons 2 Program 303(1)

Importing the Tkinter Module 303(1)

Defining the Application Class 304(1)

Defining a Constructor Method 304(1)

Defining a Method to Create the Widgets 304(1)

Creating the Application Object 305(1)

Binding Widgets and Event Handlers 305(2)

Introducing the Click Counter Program 305(1)

Setting Up the Program 306(1)

Binding the Event Handler 306(1)

Creating the Event Handler 307(1)

Wrapping Up the Program 307(1)

Using Text and Entry Widgets and the Grid Layout Manager 307(6)

Introducing the Longevity Program 308(1)

Setting Up the Program 309(1)

Placing a Widget with the Grid Layout Manager 309(1)

Creating an Entry Widget 310(1)

Creating a Text Widget 311(1)

Getting and Inserting Text with Text-Based Widgets 311(2)

Wrapping Up the Program 313(1)

Using Check Buttons 313(4)

Introducing the Movie Chooser Program 313(1)

Setting Up the Program 314(1)

Allowing a Widget's Master to Be Its Only Reference 314(1)

Creating Check Buttons 315(1)

Getting the Status of a Check Button 316(1)

Wrapping Up the Program 317(1)

Using Radio Buttons 317(4)

Introducing the Movie Chooser 2 Program 317(1)

Setting Up the Program 318(1)

Creating Radio Buttons 319(1)

Getting a Value from a Group of Radio Buttons 320(1)

Wrapping Up the Program 321(1)

Back to the Mad Lib Program 321(4)

Importing the Tkinter Module 321(1)

The Application Class's Constructor Method 321(1)

The Application Class's create_widgets() Method 322(2)

The Application Class's tell_story() Method 324(1)

The Main Part of the Program 325(1)

Summary 325(2)

Graphics: The Pizza Panic Game 327(40)

Introducing the Pizza Panic Game 328(1)

Introducing the pygame and livewires Packages 329(1)

Creating a Graphics Window 330(3)

Introducing the New Graphics Window Program 330(1)

Importing the games Module 331(1)

Initializing the Graphics Screen 332(1)

Starting the Main Loop 332(1)

Setting a Background Image 333(2)

Introducing the Background Image Program 333(1)

Loading an Image 334(1)

Setting the Background 334(1)

Understanding the Graphics Coordinate System 335(1)

Displaying a Sprite 336(5)

Introducing the Pizza Sprite Program 336(2)

Loading an Image for a Sprite 338(1)

Creating a Sprite 339(1)

Adding a Sprite to the Screen 339(2)

Displaying Text 341(2)

Introducing the Big Score Program 341(1)

Importing the color Module 342(1)

Creating a Text Object 342(1)

Adding a Text Object to the Screen 343(1)

Displaying a Message 343(3)

Introducing the You Won Program 343(2)

Importing the color Module 345(1)

Creating a Message Object 345(1)

Using the Screen's Width and Height 346(1)

Adding a Message Object to the Screen 346(1)

Moving Sprites 346(2)

Introducing the Moving Pizza Program 346(2)

Setting a Sprite's Velocity Values 348(1)

Dealing with Screen Boundaries 348(3)

The Bouncing Pizza Program 348(1)

Setting Up the Program 349(1)

Deriving a New Class from Sprite 349(1)

Overriding the update() Method 350(1)

Wrapping Up the Program 350(1)

Handling Mouse Input 351(3)

Introducing the Moving Pan Program 351(1)

Setting Up the Program 351(1)

Reading Mouse X- and Y-Coordinates 352(1)

Setting Mouse Pointer Visibility 353(1)

Grabbing Input to the Graphics Window 353(1)

Wrapping Up the Program 354(1)

Detecting Collisions 354(4)

Introducing the Slippery Pizza Program 354(2)

Setting Up the Program 356(1)

Detecting Collisions 356(1)

Handling Collisions 356(1)

Wrapping Up the Program 357(1)

Back to the Pizza Panic Game 358(7)

Setting Up the Program 358(1)

The Pan Class 358(2)

The Pizza Class 360(2)

The Chef Class 362(2)

The main() Function 364(1)

Summary 365(2)

Sound, Animation, and Program Development: The Astrocrash Game 367(48)

Introducing the Astrocrash Game 368(1)

Reading the Keyboard 369(3)

Introducing the Read Key Program 369(1)

Setting Up the Program 370(1)

Testing for Keystrokes 370(2)

Wrapping Up the Program 372(1)

Rotating a Sprite 372(3)

Introducing the Rotate Sprite Program 372(2)

Using a Sprite's angle Property 374(1)

Creating an Animation 375(3)

Introducing the Explosion Program 375(1)

Examining the Explosion Images 375(1)

Setting Up the Program 376(1)

Creating a List of Image Files 376(1)

Creating an Animation Object 377(1)

Working with Sound and Music 378(5)

Introducing the Sound and Music Program 378(1)

Working with Sounds 378(3)

Working with Music 381(1)

Wrapping Up the Program 382(1)

Planning the Astrocrash Game 383(1)

Game Features 383(1)

Game Classes 384(1)

Game Assets 384(1)

Creating Asteroids 384(4)

The Astrocrash01 Program 384(1)

Setting Up the Program 385(1)

The Asteroid Class 385(2)

The main() Function 387(1)

Rotating the Ship 388(1)

The Astrocrash02 Program 388(1)

The Ship Class 388(1)

Instantiating a Ship Object 389(1)

Moving the Ship 389(3)

The Astrocrash03 Program 389(1)

Importing the math Module 390(1)

Adding Ship Class Variable and Constant 390(1)

Modifying Ship's update() Method 391(1)

Firing Missiles 392(4)

The Astrocrash04 Program 392(1)

Modifying Ship's update() Method 392(1)

The Missile Class 393(3)

Controlling the Missile Fire Rate 396(1)

The Astrocrash05 Program 396(1)

Adding a Ship Class Constant 396(1)

Creating Ship's Constructor Method 397(1)

Modifying Ship's update() Method 397(1)

Handling Collisions 397(3)

The Astrocrash06 Program 398(1)

Modifying Missile's update() Method 399(1)

Adding Missile's die() Method 399(1)

Modifying Ship's update() Method 399(1)

Adding Ship's die() Method 399(1)

Adding an Asteroid Class Constant 400(1)

Adding Asteroid's die() Method 400(1)

Adding Explosions 400(5)

The Astrocrash07 Program 400(1)

The Wrapper Class 401(1)

The Collider Class 402(1)

Modifying the Asteroid Class 403(1)

Modifying the Ship Class 403(1)

Modifying the Missile Class 404(1)

The Explosion Class 404(1)

Adding Levels, Scorekeeping, and Theme Music 405(9)

The Astrocrash08 Program 405(1)

Importing the color Module 406(1)

The Game Class 406(5)

Adding an Asteroid Class Variable and Constant 411(1)

Modifying Asteroid's Constructor Method 411(1)

Modifying Asteroid's die() Method 412(1)

Adding a Ship Class Constant 412(1)

Modifying Ship's Constructor Method 413(1)

Modifying Ship's update() Method 413(1)

Adding Ship's die() Method 413(1)

The main() Function 414(1)

Summary 414(1)

APPENDIX A livewires Reference 415(14)

The livewires Package 416(1)

games Classes 416(8)

The Screen Class 416(2)

The Sprite Class 418(2)

The Text Class 420(1)

The Message Class 421(1)

The Animation Class 421(1)

The Mouse Class 422(1)

The Keyboard Class 423(1)

The Music class 423(1)

games Functions 424(1)

games Constants 425(2)

color Module Constants 427(2)
Index 429

已确认勘误

次印刷

页码 勘误内容 提交人 修订印次

    • 名称
    • 类型
    • 大小

    光盘服务联系方式: 020-38250260    客服QQ:4006604884

    意见反馈

    14:15

    关闭

    云图客服:

    尊敬的用户,您好!您有任何提议或者建议都可以在此提出来,我们会谦虚地接受任何意见。

    或者您是想咨询:

    用户发送的提问,这种方式就需要有位在线客服来回答用户的问题,这种 就属于对话式的,问题是这种提问是否需要用户登录才能提问

    Video Player
    ×
    Audio Player
    ×
    pdf Player
    ×
    Current View

    看过该图书的还喜欢

    some pictures

    解忧杂货店

    东野圭吾 (作者), 李盈春 (译者)

    亲爱的云图用户,
    光盘内的文件都可以直接点击浏览哦

    无需下载,在线查阅资料!

    loading icon