Basic Programming Structure
Structures
• Sequence
• Selection
• Repetition
Sequence
• In a computer program or an algorithm, Sequence involves simple
steps which are to be executed one after other
Selection
• Selection is used in a computer program or algorithm to determine
which particular step or set of steps is to be executed
• Flowchart of pseudocode statement
false true
grade >= 60
print “Failed” print “Passed”
Repetition
• Repeat the part of computer program until the condition is met
• An occurrence of repetition is usually know as a loop
• The body of the loop is executed repeatedly while the termination
condition is true