💻 Computer Science · Topic 20 of 97

Pseudocode

Pseudocode is a way of writing an algorithm in plain structured language that is not tied to any programming language.

▶ Interact

Play with the controls to see the idea in action.

Loading animation…

📘 Learn

Pseudocode is a way of writing an algorithm in plain structured language that is not tied to any programming language.

  • Use keywords like IF, THEN and WHILE
  • Indent to show structure
  • Plan code before coding

🧠 Quick quiz

Three questions. Score 2 or more to complete the topic.

What is Pseudocode?

Within Computer Science, which covers algorithms, programming, data, networks, hardware and safe, responsible use of technology, this topic explains Pseudocode. Computing topics explain how software, hardware and data work, with diagrams and models that show each step in order.

Check that you can explain Pseudocode in your own words and give one example from everyday life. If you can do that, you have understood the core idea.

Understanding Pseudocode helps you design, test and explain programs, websites and systems, from small projects to exam questions.

Pseudocode in detail

Pseudocode is a way of writing an algorithm in structured, plain-English-like statements that are not tied to any programming language. It uses keywords such as INPUT, OUTPUT, IF...THEN...ELSE, WHILE, FOR and END, with indentation to show structure.

It lets you plan the logic without worrying about syntax, and it can be converted into any language. For example: INPUT age; IF age >= 18 THEN OUTPUT "Adult" ELSE OUTPUT "Child". Good pseudocode is clear, consistent and detailed enough to code from. Examination boards often have their own conventions.

How the interactive helps you understand Pseudocode

Click a step, or use the Previous and Next buttons, to move through the sequence one stage at a time. Auto-play moves on for you.

Before you change anything, predict the result. Then change one value at a time and check whether your prediction was right. This is a quick way to build a correct mental model of Pseudocode.

Real-life uses and examples

Common mistakes to avoid

Frequently asked questions about Pseudocode

What is Pseudocode?

Pseudocode is a way of writing an algorithm in plain structured language that is not tied to any programming language.

What are the most important points about Pseudocode?

The main points are: Use keywords like IF, THEN and WHILE; Indent to show structure; Plan code before coding.

Why is Pseudocode useful?

Understanding Pseudocode helps you design, test and explain programs, websites and systems, from small projects to exam questions.

How can I practise Pseudocode?

Open the interactive at the top of this page and change the controls one at a time. Predict the result before each change, then take the three-question quiz. A score of two or more marks the topic as complete on this device.

Which topics are related to Pseudocode?

Related topics in Computer Science include Computational Thinking, Selection: If Statements, Strings and String Handling.

← PreviousFlowchartsNext →Decomposition and Abstraction

Keep exploring Computer Science