Python

  1. Home
  2. Computing & Technology
  3. Python

How a Computer Reads a Program

From Al Lukaszewski, for About.com

7 of 8

Three Statements - Part 2

Control statements have the sole purpose of regulating the flow of the program. Like a traffic signal, a control statement, or loop, tells the computer whether to go or stop. It does this by expressing the conditions under which an action should occur. If the conditions are not met, the entire loop is ignored by the computer.

Operation statements are the lifeblood of a program. These statements tell the computer what to do. Like the example about Jack and Jane above, operation statements are commands to do an action on a certain input and to produce a certain output. Some commands expect to be told explicitly upon which input to act or where it should to direct the output. If this information is expected and not given, the command will be unclear to the computer, and the program will quit unexpectedly.

Explore Python

About.com Special Features

Build Your Own Website

Step-by-step advice on how to do everything from choosing a Web host to promoting your content. More >

Connect Your Home Computers

Easy ways to connect two computers for networking purposes. More >

Python

  1. Home
  2. Computing & Technology
  3. Python
  4. Beginning Python
  5. Python Programming - Before Programming Python - Statements and Assignments - Three Statements - Part 2

©2009 About.com, a part of The New York Times Company.

All rights reserved.