Introduction to Programming

Module 1 · Introduction to Programming · Lesson 2 of 7

Natural languages vs programming languages

We talk to each other in natural languages like English — languages that grew up on their own over thousands of years. They're powerful, but slippery: the same sentence can mean different things, and we lean on tone, context and common sense to fill the gaps.

Natural language

“I saw her duck.”

?
🦆 her pet duck
🙇 she lowered her head

Two meanings — which one?

Programming language
print(2 + 3)
5

One meaning — always 5.

A computer has none of that common sense. So we talk to it in a programming language — one that was deliberately designed to have a single, exact meaning for every valid statement. There's no room for “you know what I meant.” Given the same input, it does the same thing, every time.

That strictness can feel unforgiving at first, but it's a gift: once you know the rules, the computer's behaviour is completely predictable. Your job as a programmer is to say precisely what you mean.