Structure of proecudural programs

Seuqential Code is probably the most straight forward programming construct

  • The computer executes each statement
  • Once the statement has been exectuted it moves onto the next statement
  • Finishes when nothing is left to execute

Selection code is where different code is exectuted dependant on what test is satisfied by the user


IF condition is TRUE

then do this


do that

Iteration is repeating a statement or a compound statement over and over untill a condition is satisfied

3 types of iteration

  • Fixed repitition
  • Pre test
  • Post test

Fixed repitition is where the iteration is set for a certain number of times

Pre test is where the program tests before exectution and the program will only exectute if the loop is true

Post test is where the loop first exectutes and only stops when the boolean expression is tested to be true

HideShow resource information
  • Created by: Seb
  • Created on: 21-05-10 10:14

Pages in this set

Page 1

Preview of page 1

Candidates should be able to:

a) Define and correctly use the following terms as they apply to
procedural programming:
i Statement
ii Subroutine
iii Procedure
iv Function
v parameter/argument
vi sequence
vii selection
viii iteration/repetition, loop

b) Identify the three basic programming constructs used to control the
flow of execution,…

Page 2

Preview of page 2

Mrs Sainsbury

Page 3

Preview of page 3
e) Understand and use nested:
i selection statements
ii iteration statements

f) Understand, create and use subroutines
i Procedures
ii Functions
° Including:
iii the passing of parameters
iv the appropriate use of the return value of functions

g) Identify and use recursion to solve problems
Show an understanding of…


No comments have yet been made

Similar Computing resources:

See all Computing resources »