Beginner Tutorial

Learn Pseudocode
From Scratch

A step-by-step guide to writing pseudocode for Cambridge IGCSE & A-Level Computer Science. Run every example live in your browser — no experience needed.

🚀 Start Learning Open Editor

⏱ Takes about 15 minutes    📝 6 runnable examples    🎓 IGCSE & A-Level

What is Pseudocode?

Pseudocode is a way of writing algorithms using structured, plain-English keywords. It's not a programming language — you can't run it on Python or Java. Instead, it's designed to describe logic clearly without worrying about the strict syntax rules of a real language.

Computer Science exams (like Cambridge IGCSE 0478, O-Level 2210, and A-Level 9618) use pseudocode to test whether you understand how algorithms work, not whether you can memorise Python syntax. That's why learning pseudocode is essential for exam success.

Step 1

OUTPUT — Your First Pseudocode Statement

The simplest thing you can do in pseudocode is display text to the user. The keyword is OUTPUT:

OUTPUT "Hello, World!"
OUTPUT "Welcome to pseudocode!"

This prints two lines of text. Try it in the editor — click "Open Editor" above, paste this code, and hit Run.

Step 2

Variables — Storing Data

Variables hold values that your program uses. In Cambridge pseudocode, you must declare a variable with its type before using it:

DECLARE Name : STRING
DECLARE Age : INTEGER

Name  "Alice"
Age  16

OUTPUT "Name: ", Name
OUTPUT "Age: ", Age

The five main data types are: INTEGER (whole numbers), REAL (decimals), STRING (text), BOOLEAN (TRUE/FALSE), and CHAR (single character).

Step 3

INPUT — Getting User Data

Use INPUT to ask the user for information:

DECLARE UserName : STRING
OUTPUT "What is your name?"
INPUT UserName
OUTPUT "Hello, ", UserName, "!"

When you run this in PseudoStudio, a terminal will pop up and wait for you to type your name.

Step 4

IF Statements — Making Decisions

Use IF...THEN...ELSE...ENDIF to make your program choose between different actions:

DECLARE Score : INTEGER
OUTPUT "Enter your score:"
INPUT Score

IF Score >= 50 THEN
    OUTPUT "You passed!"
ELSE
    OUTPUT "Try again next time."
ENDIF

The condition (Score >= 50) is checked. If TRUE, the first block runs. Otherwise, the ELSE block runs.

Step 5

Loops — Repeating Actions

Loops let you repeat code. The FOR loop repeats a set number of times:

DECLARE i : INTEGER
FOR i  1 TO 5
    OUTPUT "Iteration: ", i
NEXT i

This prints "Iteration: 1" through "Iteration: 5". There are also WHILE loops (check condition first) and REPEAT...UNTIL loops (check condition after). Learn more in the Loops Guide.

Step 6

Arrays — Storing Multiple Values

Arrays hold multiple values under one name. Cambridge pseudocode uses 1-based indexing:

DECLARE Names : ARRAY[1:3] OF STRING
DECLARE i : INTEGER

Names[1]  "Alice"
Names[2]  "Bob"
Names[3]  "Charlie"

FOR i  1 TO 3
    OUTPUT Names[i]
NEXT i

This creates an array of 3 strings and prints each one. Learn more in the Arrays Guide.

What to Learn Next

You've covered the foundations! Here's your learning roadmap:

🔁

Loops Deep Dive

FOR, WHILE & REPEAT UNTIL — pre/post conditions, definite vs indefinite iteration

Read Guide →
📦

Arrays & 2D Arrays

Declare, populate & traverse 1D and 2D arrays with nested loops

Read Guide →
🔧

Functions & Procedures

BYVAL vs BYREF, return values, modular programming

Read Guide →
📝

String Handling

SUBSTRING, LENGTH, UCASE, LCASE & more built-in functions

Read Guide →
📂

File Handling

OPENFILE, READFILE, WRITEFILE & CLOSEFILE operations

Read Guide →
🔢

Sorting Algorithms

Bubble Sort, Insertion Sort, Linear & Binary Search

Read Guide →

Frequently Asked Questions

How long does it take to learn pseudocode?
You can learn the basics in about 15–30 minutes. The core concepts — variables, INPUT/OUTPUT, IF statements, and loops — are straightforward because pseudocode is designed to be readable. Mastering advanced topics like arrays, functions, and file handling typically takes a few hours of practice with our interactive guides.
Is pseudocode a programming language?
Not exactly. Pseudocode is a structured way to describe algorithms using plain English-like keywords. It's used in Computer Science exams to test logical thinking without needing a real compiler. However, PseudoStudio can actually execute Cambridge pseudocode, so you can practice and test your code as if it were a real language.
Can I practice pseudocode online for free?
Yes! PseudoStudio offers a free online pseudocode editor where you can write, run, and test pseudocode directly in your browser. It supports Cambridge IGCSE (0478) and A-Level (9618) syntax, and includes 20+ ready-to-run examples to practice with. No signup or download required.
Which exam boards use pseudocode?
Cambridge IGCSE (0478), Cambridge O-Level (2210), Cambridge A-Level (9618), and IB Computer Science all use pseudocode in their exams. AQA, OCR, and Edexcel in the UK also use pseudocode-like notation. PseudoStudio primarily supports Cambridge syntax, which is the most widely used worldwide.

Ready to Start Coding?

You've learned the basics. Now open the editor and start writing real pseudocode — it runs instantly, for free.

▶ Open Free Pseudocode Editor