1. Not all Snakes Slither
- A few words about Language
- Installing Python
- Installing Python on Windows
- Installing Python on Mac OS X
- Installing Python on Ubuntu
- Once you've installed Python
- Saving your Python Programs
2. Calculations and variables
- Calculating with Python
- Python Operators
- The order of operations
- Variables are like Labels
- Using variables
3. Strings, Lists, Tuples and Maps.
- Strings
- Creating Strings
- Handling Problems with Strings
- Embedding values in Strings
- Multiplying Strings
- Lists are more powerful than Strings
- Adding items to a list
- Removing items from a list
- List Arithmetic
- Tuples
- Python maps won't help you find your way
- What you learned
- Programming Puzzles
- #1: Favorites
- #2: Counting Combatants
- #3: Greetings
4. Drawing with Turtles
- Using Python's Turtle Mode
- Creating a Canvas
- Moving the Turtle
- What you learned
- Programming Puzzles
- #1: A Rectangle
- #2:A Triangle
- #3:A Box without Corners
5.Asking Questions with if and else
- if Statements
A Block is a Group of Programming Statements
- if-then-else Statements
- if and elif Statements
- Combining Conditions
- Variables with No Value - None
- The Difference between Strings and Numbers
- What you learned
- Programming Puzzles
- What you learned
- #1:are you rich?
- #2:Twinkies!
- #3:Just the Right Number
- #4:I Can fight those Ninjas
6. Going Loopy
- Using for Loops
- While we're talking about looping
- What you learned
- Programming Puzzles
- The Hello Loop
- Even Numbers
- My Five Favorite Ingredients
- Your weight on the moon
7. Recycling your Code with Functions and Modules
- Using Functions
- Parts of a function
- Variables and Scope
- Using Modules
- What you learned
- Programming Puzzles
- #1:Basic Moon Weight Function
- #2:Moon Weight Function and Years
- #3:Moon Weight Program
8. How to use classes and objects
- Breaking things into Classes
- Children and Parents
- Adding objects to Classes
- Defining Functions of Classes
- Adding Class Characteristics as Functions
- Why Use Classes and Objects?
- Objects and Classes in Pictures
- Other Useful Features of Objects and Classes
- Inherited Functions
- Functions Calling Other Functions
- Initializing an Object
- What you learned
- Programming Puzzles
- #1:The Giraffe Shuffle
- #2:Turtle Pitchfork
9. Python's Built-in Function
- Using Built-in Function
- The abs function
- The bool Function
- The dir Function
- The eval Function
- The exec Function
- The float Function
- The int Function
- The len Function
- The max and min Functions
- The range Function
- The sum function
- Working with files
- Creating a Test File
- Opening a File in Python
- Writing to Files
- What you learned
- Programming Puzzles
- #1:Mystery Code
- #2:a Hidden Message
- #3:Copying a File
10. Useful Python Modules
- Making copies with the copy Module
- Keeping Track of Keywords with the keyword Module
- Getting Random Numbers with the random Module
- Using randint to Pick a Random Number
- Using choice to Pick a Random Item from a List
- Using shuffle to Shuffle a List
- Controlling the Shell with the sys Module
- Exiting the Shell with the exit function
- Reading with the stdin Object
- Writing with the stdout Object
- Which Version of Python Am I Using?
- Doing Time wiwth time Module
- Converting a Date with asctime
- Getting the Date and Time with localtime
- Taking Some Time Off with sleep
- Using the pickle Module to Save Information
- What you learned
- Programming Puzzles
- #1:Copied Cars
- #2:Pickled Favorites
11.More Turtle Graphics
- Starting with the basic Square
- Drawing Stars
- Drawing a Car
- Coloring things in
- A Function to Draw a Filled Circle
- Creating Pure Black and White
- A Square-Drawing Function
- Drawing Filled Squares
- Drawing Filled Stars
- What you learned
- Programming Puzzles
- #1:Drawing an Octagon
- #2:Drawing a Filled Octagon
- #3:Another Star-Drawing Function
12. Using tkinter for Better Graphics
- Creating a Clickable Button
- Using Named Parameters
- Creating a Canvas For Drawing
- Drawing Lines
- Drawing Boxes
- Drawing a Lot of Rectangles
- Setting the Color
- Drawing Arcs
- Drawing Polygons
- Displaying Text
- Displaying Images
- Creating Basic Animation
- Making an Object react to Something
- More Ways to Use the Identifier
- Programming Puzzles
- #1:Fill the Screen with Triangles
- #2:The Moving Triangle
- #3:The Moving Photo