You are here:About>Computing & Technology>Python> Beginning Python> Python Programming - Before Programming Python - Key Reserved Words - Reserved Words Are Key
About.comPython
Newsletters & RSSEmail to a friendSubmit to Digg

How a Computer Reads a Program

From Al Lukaszewski,
Your Guide to Python.
FREE Newsletter. Sign Up Now!

Reserved Words Are Key

There are two parts to every executing program: data and code. The first is fairly obvious; it is the information to be processed. The second is comprised of three kinds of statements: assignment, iteration, and operation. The kind of statement determines what the computer will do with it. Unlike in human speech, computers do not understand polite tones. There is no such thing as "I would like you to print now" in computer programming. Instead, one simply tells the computer "print", and it does it.

Programming happens when one tells the computer to do something in a way that the computer understands. So, the secret of programming is how to tell a computer to do something. This differs by programming language. No one programs in the language that the computer itself uses (binary). Instead every language is translated for the computer. Exactly which words are translated and how depends on the vocabulary of the programming language. This vocabulary is a set of terms called "reserved words".

Reserved words are trigger words. When the Python interpreter or computer reads them, it triggers a response, an action. Depending on what the term is, the computer will do something immediately (e.g., 'break') or will look for more information. If two reserved words begin with some of the same letters, the computer reads the program until it is clear which word is meant; only then does the computer do something.

  1. Clueless Computers
  2. Reserved Words Are Key
  3. Picking an Argument - Part 1
  4. Picking an Argument - Part 2
  5. Picking an Argument - Part 3
  6. Three Statements - Part 1
  7. Three Statements - Part 2
  8. Summary

<< Previous | Next >>

 All Topics | Email Article | | |
Advertising Info | News & Events | Work at About | SiteMap | Reprints | HelpOur Story | Be a Guide
User Agreement | Ethics Policy | Patent Info. | Privacy Policy©2008 About, Inc., A part of The New York Times Company. All rights reserved.