Your First Program in Plain English¶
New to coding? EPL is a programming language where every keyword is an ordinary English word. This tutorial takes you from zero to writing real programs — loops, conditions, functions — without learning a single cryptic symbol.
No install needed to follow along: open the
EPL Playground and type as you read.
To run it locally: pip install eplang.
Hello, world¶
Say prints text. Run it and you'll see:
That's a complete program. Compare it to what most languages make you write for the
same thing — no print(), no System.out.println, no semicolons.
Variables¶
A variable is a labelled box that holds a value:
The + joins pieces of text together. Numbers work as you'd expect:
Making decisions¶
Programs choose what to do using If:
Read it aloud — it's a sentence. is greater than, is less than, and
is equal to are the comparisons, spelled the way you'd say them.
Repeating things¶
To do something several times, use a loop:
To count through a range:
Working with lists¶
A list holds many values in order:
scores = [95, 87, 92]
total = 0
For Each s in scores
total = total + s
End
Say "Total: " + total
Say "Average: " + (total / length(scores))
For Each ... in walks through every item. length(...) tells you how many there are.
FizzBuzz — the classic first challenge¶
This is the program every new programmer writes: print numbers 1 to 15, but say
"Fizz" for multiples of 3, "Buzz" for multiples of 5, and "FizzBuzz" for both.
% gives the remainder after division, so a remainder of 0 means "divides evenly."
For i from 1 to 15
If i % 15 is equal to 0 then
Say "FizzBuzz"
Otherwise if i % 3 is equal to 0 then
Say "Fizz"
Otherwise if i % 5 is equal to 0 then
Say "Buzz"
Otherwise
Say i
End
End
You just wrote a program that stumps a lot of interview candidates — and you can read every line of it.
Functions — naming a piece of work¶
A function bundles steps under a name so you can reuse them:
Functions can call themselves, which is how you express things like the Fibonacci sequence:
Function fibonacci takes n
If n is less than 2 then
Return n
End
Return fibonacci(n - 1) + fibonacci(n - 2)
End
Say fibonacci(10)
Where to go next¶
You now know variables, conditions, loops, lists, and functions — the core of every programming language, in plain English.
- Build a REST API in plain English
- Todo app with a real database
- Full tutorials index
- Keep experimenting in the Playground
If EPL made programming click for you, star it on GitHub — it helps other beginners find it.