Python Programming for the Absolute Beginner provides a gentle introduction into the world of programming. Every chapter will contain several new concepts with a small but complete example program for each one. No other Python book has multiple chapters dedicated to multimedia. Covers the Interpreter, the IDLE, Variables, Strings, Looping, Tuples, Iterators, Widgets, Sprites, and Sound.
Author(s): Michael Dawson
Publisher: Cengage Learning
Year: 2003
Language: English
Commentary: decrypted from C87300BBE619D5F0876E904FE94AF2CA source file
Pages: 400
Table of Contents
BackCover
Python Programming for the Absolute Beginner
Introduction
Chapter 1: Getting Started: The Game over Program
Examining the Game Over Program
Introducing Python
Setting Up Python on Windows
Setting Up Python on Other Operating Systems
Introducing the Python IDLE
Back to the Game Over Program
Summary
Challenges
Chapter 2: Types, Variables, and Simple I/O: The Useless Trivia Program
Introducing the Useless Trivia Program
Using Quotes with Strings
Using Escape Sequences with Strings
Concatenating and Repeating Strings
Working with Numbers
Understanding Variables
Getting User Input
Using String Methods
Using the Right Types
Converting Values
Back to the Useless Trivia Program
Summary
Challenges
Chapter 3: Branching, while Loops, and Program Planning: The Guess My Number Game
Introducing the Guess My Number Game
Generating Random Numbers
Using the if Structure
Using the if-else Structure
Using the if-elif-else Structure
Creating while Loops
Avoiding Infinite Loops
Treating Values as Conditions
Creating Intentional Infinite Loops
Using Compound Conditions
Planning Your Programs
Returning to the Guess My Number Game
Summary
Challenges
Chapter 4: for Loops, Strings, and Tuples: The Word Jumble Game
Introducing the Word Jumble Game
Counting with a for Loop
Using Sequence Operators and Functions with Strings
Indexing Strings
Understanding String Immutability
Building a New String
Slicing Strings
Creating Tuples
Using Tuples
Back to the Word Jumble Game
Summary
Challenges
Chapter 5: Lists and Dictionaries: The Hangman Game
Introducing the Hangman Game
Using Lists
Using List Methods
Understanding When to Use Tuples Instead of Lists
Using Nested Sequences
Understanding Shared References
Using Dictionaries
Back to the Hangman Game
Summary
Challenges
Chapter 6: Functions: The Tic-Tac-Toe Game
Introducing the Tic-Tac-Toe Game
Creating Functions
Using Parameters and Return Values
Using Keyword Arguments and Default Parameter Values
Using Global Variables and Constants
Back to the Tic-Tac-Toe Game
Summary
Challenges
Chapter 7: Files and Exceptions: The Trivia Challenge Game
Introducing the Trivia Challenge Game
Reading from Text Files
Writing to a Text File
Storing Complex Data in Files
Handling Exceptions
Back to the Trivia Challenge Game
Summary
Challenges
Chapter 8: Software Objects: The Critter Caretaker Program
Introducing the Critter Caretaker Program
Understanding Object-Oriented Basics
Creating Classes, Methods, and Objects
Using Constructors
Using Attributes
Using Class Attributes and Static Methods
Understanding Object Encapsulation
Using Private Attributes and Private Methods
Understanding New-Style and Old-Style Classes
Controlling Attribute Access
Back to the Critter Caretaker Program
Summary
Challenges
Chapter 9: Object-Oriented Programming: The Blackjack Game
Introducing the Blackjack Game
Sending and Receiving Messages
Combining Objects
Using Inheritance to Create New Classes
Extending a Class through Inheritance
Altering the Behavior of Inherited Methods
Understanding Polymorphism
Creating Modules
Back to the Blackjack Game
Summary
Challenges
Chapter 10: GUI Development: The Mad Lib Program
Introducing the Mad Lib Program
Examining a GUI
Understanding Event-Driven Programming
Using a Root Window
Using Labels
Using Buttons
Creating a GUI Using a Class
Binding Widgets and Event Handlers
Using Text and Entry Widgets and the Grid Layout Manager
Using Check Buttons
Using Radio Buttons
Back to the Mad Lib Program
Summary
Challenges
Chapter 11: Graphics: The Pizza Panic Game
Introducing the Pizza Panic Game
Introducing the Pygame and LiveWires Packages
Creating a Graphics Window
Setting a Background Image
Understanding the Graphics Coordinate System
Displaying Text
Displaying a Message
Understanding the Games_Object Class
Displaying a Sprite
Moving Sprites
Dealing with Screen Boundaries
Handling Mouse Input
Detecting Collisions
Back to the Pizza Panic Game
Summary
Challenges
Chapter 12: Sound, Animation, and Program Development: The Astrocrash Game
Introducing the Astrocrash Game
Reading the Keyboard
Rotating a Sprite
Creating an Animation
Working with Sound and Music
Planning the Astrocrash Game
Creating Asteroids
Rotating the Ship
Moving the Ship
Firing Missiles
Controlling the Missile Fire Rate
Handling Collisions
Adding Explosions
Adding Levels, Scorekeeping, and Theme Music
Summary
Challenges
Appendix A: LiveWires Reference
games Module functions
games Module Constants
color Module Constants
Index
Index_A
Index_B
Index_C
Index_D
Index_E
Index_F
Index_G
Index_H
Index_I
Index_K
Index_L
Index_M
Index_N
Index_O
Index_P
Index_Q
Index_R
Index_S
Index_T
Index_U
Index_V
Index_W
Index_X
Index_Y
Index_Z
List of Figures
List of Tables
List of Sidebars
CD Content