Chapter 2. Exploring Python

In this chapter, you’ll learn how to interact with your Raspberry Pi by using Python to

  • Do math calculations quickly and easily
  • Store information using variables
  • Get messages to display on the screen
  • Create and run your first program in Python

An exciting part of programming is getting the computer to interact with you. It’s the first step toward having the computer feel artificially intelligent.

Playing with Python

One of the best ways to learn to program is by exploring and playing. When you play, you try things and see what happens. You learn by experiencing the act of programming and seeing results. In this approach, you’ll try entering different commands and see what happens.

Open IDLE for Python 3 ...

Get Hello Raspberry Pi! now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.