Copyright
Brief Table of Contents
Table of Contents
Foreword
Preface
Acknowledgments
About this book
About Hello! books
Chapter 1. Why Python?
Learning to program
Telling a computer what to do
Programming is made of ideas
Programming is design
What makes Python so great?
Python is easy
Python is a real language
Python has “batteries included”
Python has a large community
Setting up Python for Windows
Installing Python
Running Python programs on Windows
Running Python programs from the command line
Linux
Installing under Linux
Linux GUI
Linux command line
Macintosh
Updating the shell profile
Setting the default application
Troubleshooting
A syntax error
An incorrect file extension (Windows)
Python is installed in a different place (Linux)
Text editors and IDEs
Summary
Chapter 2. Hunt the Wumpus
What’s a program?
Writing to the screen
Remembering things with variables
Asking the player what to do
Making decisions
Loops
Functions
Your first program
The first version of Hunt the Wumpus
Debugging
Experimenting with your program
More (or fewer) caves
A nicer wumpus
More than one wumpus