Python Programming
About Lesson

Statement Vs Control Statement
Every executable line in the program is called as statement. There can be many types of statements like declaration statement, output statement, input statement etc. in a program. Every program line (i.e. statement) must be executed by CPU with equal priority in the order of their appearance in the program. It can take decision to skip some of the statements or to repeat some other based on its own discrimination. Now using Control Statements developer is instructing the CPU to take decision to execute or to not execute some of the program lines based on some condition. The Control statements that we are discussing here are special statement that keep other program statements under their control. Controlling means they will decide the execution of those statement.

Normal Flow of Program Execution
By reading above paragraph, we understood that CPU must execute all the lines in the program without fail if there are no control statements. It means the program statements will be executed by CPU from top to bottom which is also known as Normal Flow of Program Execution. Control Statements of any programming language are used to change the normal flow of program execution.

Computer Algorithm defined there are three types of control statements:

  1. Decision/Selection/Branching
  2. Loop/Iteration/Repetition
  3. Jump Statements

Programming languages provide their own structures to support the above control statements.

Control Statements providing by Python Language are:

  1. Decision
    1. Simple if
    2. Multiple if
    3. If..else
    4. If…elif…else
  2. Loop
    1. While
    2. For
  3. Jump
    1. Break
    2. continue

You cannot copy content of this page