COMPUTER SCIENCE - PSEUDOCODE AND FLOWCHARTS - CHAPTER 12 / 2.1.2…
COMPUTER SCIENCE - PSEUDOCODE AND FLOWCHARTS - CHAPTER 12 / 2.1.2
Pseudocode and flowcharts are tools that a programmer may use to help design a program, or understand one that already exists.
Pseudocode is a text based list of instructions that specify how a program should work.
Pseudocode is set out with the same structure as a programming language.
Programmers can use pseudocode to plan and design programs.
Pseudocode equivalents exist for comments, variables, arrays, selection, iteration, input and output, functions and procedures.
Syntax - the rules of a language.
Selection - a statement that represents choice in an algorithm.
Case statement - is used instead of an IF statement if their are many possible paths, used for specific discrete data values not ranges. Easier if with many specific condition paths.
Procedure - a small selection of code that can be run repeatedly from different parts of the program.
Function - a procedure that returns a value.
Flowcharts are graphical methods of designing algorithms.
Flowcharts allow a designer to see a visual representation of a problem.
Flowcharts are useful in understanding the logic of complicated problems.
Flowcharts use symbols to represent processes, selection, iteration, input and output.
Direction of flow -
Start and end of the program -
Input or output of data -
Computational steps of processing functions of a program -
Decision making and branching -