🎯 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.
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.
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:
| Keyword | What it means |
|---|---|
BEGIN … END | Where the program starts and stops |
TAKE A | Get information from the user and store it in A |
SET A = 10 | Create or change a value |
DISPLAY A | Show something on the screen |
IF … END IF | Make a decision |
FOR / WHILE / REPEAT | Repeat steps |
FUNCTION … RETURN … END FUNCTION | A 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
1BEGIN2 TAKE A, B3 SET C = A + B4 DISPLAY C5END
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 C1$c = $a + $b;2echo $c;1let c = a + b;2console.log(c);✨ The logic didn’t change. Only the syntax changed.
Check your understanding
TAKE A do?1BEGIN2 SET A = 53 SET B = 104 SET C = A + B5 DISPLAY C6END
1BEGIN2 SET A = 103 SET B = 204 DISPLAY C5END
Write a program that TAKEs a number N, stores double the number in a variable called DOUBLE, and DISPLAYs it.
📌 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.