1THE INTERACTIVE SHELL

image

Before you can make games, you need to learn a few basic programming concepts. You’ll start in this chapter by learning how to use Python’s interactive shell and perform basic arithmetic.

Some Simple Math

Start IDLE by following the steps in “Starting IDLE” on page xxvi. First you’ll use Python to solve some simple math problems. The interactive shell can work just like a calculator. Type 2 + 2 into the interactive shell at the >>> prompt and press ENTER. (On some keyboards, ...

Get Invent Your Own Computer Games with Python , 4th Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.