This resource is designed as a syntax guide that can be used offline as a printable resource in an Edexcel Computer Science NEA.
This website aims to give a quick reference for VB.NET, Python and pseudocode and is aimed primarily at teachers & students working towards a GCSE in Computer Science
VB.NET and Python are both programming languages designed to be understood and followed by computers. Pseudocode is not a programming language: it's written to be understood by humans so that they can turn it into any programming language.
Each exam board has published a document saying how they'll write pseudocode in their exams. The whole idea of syntax (a set of rules) for pseudocode is silly - it's not designed to be a programming language that is run by a computer. With this in mind, all exam boards state that you don't have to follow the syntax for 'their' version of pseudocode when you write out your own algorithms, but you should be able to understand their version of pseudocode when reading an algorithm in an exam.
Integers are whole numbers
Reals are numbers that can have decimal places
Booleans are either True or False
Character is a single digit
Strings are made up of characters
The value of constants can only ever be set once.
Initialises a one-dimensional array with a set of values.
Indices start at zero (0) for all data structures.
This generates a random number from 0 to n.
A comment can be on a line by itself or at the end of a line.
Assigns a value to an element of a one-dimensional array.
Indices start at zero (0) for all data structures.
Assigns a value to an element of a two dimensional array.
Indices start at zero (0) for all data structures.
If <expression> is true then command is executed.
If <expression> is true then first <command>
Pre-conditioned loop. Executes <command> whilst <condition> is true.
Post-conditioned loop. Executes <command> until <condition> is true. The loop must execute at least once.
Count controlled loop. The number of times <command> is executed is determined by the expression
Count controlled loop. Executes
Count controlled loop using a step
Count controlled loop. Executes for each element of an array.
Sends output to the screen.
Reads input of specified type.
Reads in a record from a <file> and assigns to a <variable>.
Each READ statement reads a record from the file.
Reads in the whole contents from a <file> and assigns to a <variable>.
Writes a record to a file.
Each WRITE statement writes a record to the file.
Defines a procedure.
Defines a function.
Calls a procedure or a function.
Used to change values by performing mathematical calculations.
Used to compare two values
Used to combine multiple boolean expressions:
AND: Returns true if both conditions are true.
OR: Returns true if any of the conditions are true.
NOT: Reverses the outcome of the expression; true becomes false, false becomes true.
Loading...