Most programSequences of instructions for a computer. are developed using programming languageA language used by a programmer to write a piece of software. . These languages have specific syntaxThe set of rules that specify the correct sequence of symbols used to correctly form a structured program using specific programming language. that must be used so that the program will run properly.
pseudocode Also written as pseudo-code. A method of writing up a set of instructions for a computer program using plain English. This is a good way of planning a program before coding. is not an actual programming language. Instead, it is a simple way of describing a set of instructions in a manner that resembles a programming language. It has its own syntax, some of which is very similar to many actual programming languages. Any algorithmA sequence of logical instructions for carrying out a task. In computing, algorithms are needed to design computer programs. designed using pseudocode will not run unless they are converted into an actual programming language.
This simple pseudocode algorithm asks a user to input what their favourite subject is:
while answer != 'computer science'
answer = input ('What is your favourite subject? ')
if answer == 'computer science' then
print('Good choice!')
else
print('Really? ')
endif
endwhile
Advantages and disadvantages of pseudocode
Designing an algorithm in pseudocode has benefits:
because pseudocode is similar to a programming language, it can be quickly and easily converted into an actual programming language
it is fairly easy to understand, even for non-programmers
it does not matter if there are errors in the syntax - it is usually still obvious what is intended
changes to the design can be incorporated quite easily
Pseudocode also has its disadvantages:
It can be hard to see how a program flows, for example, where does following one path as opposed to another take the program?
It can be time consuming to produce.
Pseudocode covers many areas of programming and there are different variants. The specific pseudocode syntax for your course can be found at the end of the .