Table of Contents

Chapter 1 - 

Introduction

x

Downloading and Installing Pythonx

Chapter 2 - 

"Hello World!" - Your First Program

x

Starting the Python Interpreterx
Some Simple Math Stuffx
Evaluating Expressionsx
Variablesx
Stringsx
Writing Programsx
Hello World!x
"My Favorite Stuff"x
Crazy Answers and Crazy Names for our Favorite Stuffx
Capitalizing our Variablesx

Chapter 3 - 

Guess the Number

x

Argumentsx
Blocksx
Conditions and Booleansx
Step by Step, One More Timex
Some Changes We Could Makex
A Web Page for Program Tracingx

Chapter 4 - 

Jokes

x

How Programs Run on Computersx
Some Other Escape Charactersx
Quotes and Double Quotesx

Chapter 5 - 

Dragon World

x

Boolean Operatorsx
Variable Scopex
Parametersx
Local Variables and Global Variables with the Same Namex
Where to Put Function Defintionsx
The Colon :x
Step by Step, One More Timex
Designing the Programx
A Web Page for Program Tracingx

Chapter 6 - 

Hang Man

x

Designing the Programx
ASCII Artx
Multi-line Stringsx
Listsx
Changing the Values of List Items with Index Assignmentx
List Concatenationx
The in Operatorx
Removing Items from Lists with del Statementsx
Lists of Listsx
Methodsx
The len() Functionx
The range() Functionx
for Loopsx
Strings Act Like Listsx
List Slicing and Substringsx
elif ("Else If") Statementsx
And that's it!x
Dictionariesx
Sets of Words for Hangmanx

Chapter 7 - 

Tic Tac Toe

x

Designing the Programx
Game AIx
List Referencesx
Short-Circuit Evaluationx
The None Valuex
A Web Page for Program Tracingx
Tips for Inventing Your Own Gamesx

Chapter 8 - 

Bagels

x


Chapter 9 - 

Othello

x


Chapter 10 - 

Secret Code

x