LESSON 05 / 12

What Is Pseudocode?

Pseudocode is a simple, English-style way to write algorithms. It has the structure of code without the fussy rules — and it’s the language of this whole course.

🎓Beginnerlevel
⏱️15 minto finish
✏️7activities

📂 Computational Thinking & Pseudocode🏷️ Computational thinking

🎯 By the end of this lesson you can…

  • Explain what pseudocode is and why it’s useful
  • Recognise the LearnWith pseudocode keywords
  • Explain the difference between TAKE and SET
  • Read and run a complete pseudocode program

“Pseudo” means “pretend”

Pseudocode is “pretend code”. It looks a bit like a programming language — capital-letter keywords, one instruction per line — but it reads like simple English. There are no semicolons to forget and no cryptic error messages.

📘 New termPseudocode

A simple, structured, English-style way of writing an algorithm, without the strict rules of a real programming language.

1BEGIN2    DISPLAY "Hello, world!"3END

🍎 A rough sketch before a painting: all the ideas are there, without worrying about perfect brushstrokes.

A bridge from English to real code, with pseudocode in the middle
Pseudocode is the bridge between the way you think and the code a computer runs.

Our pseudocode language

Different books use different pseudocode styles. In LearnWith we use one consistent style everywhere, so you never get confused. Here are the words you’ll meet:

The core LearnWith keywords
KeywordWhat it means
BEGIN … ENDWhere the program starts and stops
TAKE AGet information from the user and store it in A
SET A = 10Create or change a value
DISPLAY AShow something on the screen
IF … END IFMake a decision
FOR / WHILE / REPEATRepeat steps
FUNCTION … RETURN … END FUNCTIONA named, reusable set of steps

TAKE vs SET — a very important difference

These two look similar, but they mean different things:

  • TAKE — information comes from outside the program (the user types it). TAKE AGE
  • SET — the program itself creates or changes a value. SET AGE = 25
add-two-numbers.pseudo 👆 Tap a line to explain it
1BEGIN2    TAKE A, B3    SET C = A + B4    DISPLAY C5END
🧮 Trace table — TAKE and SET

Run the program in your head, one line at a time. Fill every empty box, then press Check.

1BEGIN2    TAKE A, B3    SET C = A + B4    SET D = C * 25    DISPLAY D6END

Why use pseudocode at all?

  • 😌 No syntax anxiety — focus on ideas, not symbols.
  • 🌍 Language independent — the same pseudocode becomes PHP, JavaScript, Python…
  • 🧠 Focus on logic — which is the real skill of programming.
  • 🐞 Easier debugging — mistakes are easy to spot in plain English.
  • 🔀 Switch languages easily — learn the logic once, use it everywhere.

Same logic, different syntax (just a peek!)

1SET C = A + B2DISPLAY C

✨ The logic didn’t change. Only the syntax changed.

Check your understanding

💡 Concept check
What does TAKE A do?
💡 Concept check
Which line creates a value inside the program?
🔮 What will this display?
What will be displayed?
1BEGIN2    SET A = 53    SET B = 104    SET C = A + B5    DISPLAY C6END
🐞 Find the error
What is wrong with this program?
1BEGIN2    SET A = 103    SET B = 204    DISPLAY C5END
🛠️ Your turn: double it

Write a program that TAKEs a number N, stores double the number in a variable called DOUBLE, and DISPLAYs it.

🗣️ Explain your thinking
Explain the difference between TAKE and SET to a friend who has never programmed.

📌 Key takeaways

  • Pseudocode is structured, English-style code for describing algorithms.
  • LearnWith uses one consistent style: BEGIN, END, TAKE, SET, DISPLAY, IF, FOR, WHILE, REPEAT, FUNCTION…
  • TAKE gets information from outside the program. SET creates or changes a value inside it.
  • Pseudocode is a bridge: think in plain steps first, then translate to any language.

Finished reading & practising?

Saved in this browser. Create a free account to keep it forever.