1. Technology

How a Computer Reads a Program

By

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.

  1. About.com
  2. Technology
  3. Python
  4. Beginning Python
  5. Python Programming - Before Programming Python - Statements and Assignments - Three Statements - Part 2

©2014 About.com. All rights reserved.