Why can't computers interpret pseudocode?


A pseudocode (from the Greek pseudo = false) is a non-functional code that is written to get a structured overview of a program and its actions. It is mainly used as an aid in high-level programming languages, but can also be useful in Scratch for complex projects.


A pseudocode consists of human-understandable text, not complicated code words. It is important that it provides an approximate overview of the program. It is not necessary to give all the details of certain actions, as they are rather irrelevant. After all, the pseudocode is intended as a help for itself and not as a code document for the computer to be interpreted.

The form (syntax) of a pseudocode is largely free and is partly based on the programming language that one knows best. Someone who is often programmed in C, C # or Java, for example, provides program parts in loops and conditional statements with curly brackets, someone who prefers to work with Python will do such a structuring by indentation. Scratchers may draw blocks.


The writing of a pseudocode serves as an aid for the creation of programs. Thanks to the overview and structure he has shown, it can be very useful, especially with complex programs, as it helps to keep everything in order while programming and to make fewer errors in the scripts.


For example, a pseudocode for a quiz game could be:

When the program begins
repeat 10 times {

ask a random question
wait for answer
if answer correct then {
confirm answer
give a point
} otherwise {
give correct answer

quit the program

This could be represented similarly with imaginary scratch blocks:

If the program starts :: events has repeat (10) times ask a random question :: sensing wait for answer :: control if then {confirm answer :: looks give a point :: variables} otherwise {name correct Answer :: looks} :: control end exit the program :: control cap

See also

Category: En-Link