So how do you run your code

There are two things that you will need to run the guessing-game program: an editor and an interpreter.

The editor saves the code you write into a file on your hard disk. The code (sometimes called the source code) is just text, and it can be written and read by humans.

The source Code

But computers can't process text meant for humans, at least not very well. That's why we need a tool to translate the human-friendly source code into the binary 1s and 0s that computers do understand. That's what an interpreter does. In this book, an interpreter called Python is used.

Hmmm... looks like a guessing game...

Py-fch,

'"kirp reley.

The ««ter^eter -translates the tetoUhesourte code Un^e that the tom?uter tan understand-

Py-fch,

'"kirp reley.

So we need an editor and a Python interpreter. Fortunately, Python 3 comes with a built-in application called IDLE, which does both jobs and more. IDLE enables you to write and edit Python code, it translates this code into binary form, and finally, it runs the Python 3 program. Because of this, IDLE is known as an Integrated Development Environment.

Let's see these steps in action.

Was this article helpful?

0 0

Post a comment