Skip to content

SpecificationI · Overview

1.1

What PseudoLearn is

PseudoLearn is a pseudocode language that really runs: what you write is analysed, run and can be watched step by step.

Markdown version

1.1.1 How it works

Pseudocode is a way of writing algorithms with words close to everyday language. Many books use it to explain ideas without depending on a particular language. PseudoLearn takes that tradition and gives it exact rules, so that a machine can check every program and run it.

A PseudoLearn program always has a named algorithm: it starts with Algorithm and ends with EndAlgorithm. The instructions go inside, one below the other.

ProgramThe average of two grades

Algorithm Media
  Define primera As Real <- 7.5;
  Define segunda As Real <- 9;
  Write "La media es ", (primera + segunda) / 2;
EndAlgorithm

Output

La media es 8.25

The program finishes normally.

Figure 1.1-1.One language and one engine behind the editor, the command line and the web.

At the top, the PseudoLearn language in Spanish and English. Below, the engine that analyses and runs. Three arrows leave the engine towards the app, the command line and the web.

1.1.2 Classic pseudocode, unchanged

If you have written pseudocode in class, almost everything you know works the same: algorithm, define, read, write, if, switch, while, repeat and for. PseudoLearn adds three requirements that avoid hard-to-see mistakes: every simple statement ends with a semicolon, indices start at zero and no variable has an invented initial value.

In short

  • PseudoLearn is pseudocode with exact rules.
  • Every program has a named Algorithm and its EndAlgorithm.
  • The same engine is behind the editor, the command line and the web.
  • Classic pseudocode works with semicolons, indices from zero and no invented values.