Table of Contents

 

Copyright

Brief Table of Contents

Table of Contents

Preface

Acknowledgments

About this book

Chapter 1. Getting Started

Installing Python

Starting Python with IDLE

Instructions, please

If it doesn’t work

Interacting with Python

Time to program

Running your first program

If something goes wrong

Syntax errors

Runtime errors

Your second program

What did you learn?

Test your knowledge

Try it out

Chapter 2. Remember This—Memory and Variables

Input, processing, output

Names

What’s in a name?

Numbers and strings

Long strings

How “variable” are they?

The new me

What did you learn?

Test your knowledge

Try it out

Chapter 3. Basic Math

The four basic operations

Operators

Order of operations

Two more operators

Exponentiation—raising to a power

Modulus—getting the remainder

Increment and decrement

Really big and really small

E-notation

Exponents vs. E-notation

What did you learn?

Test your knowledge

Try it out

Chapter 4. Types of Data

Changing types

Changing an int to a float

Changing a float to an int

Changing a string to a float