Programming languages: giving computers instructions — Computing, 7–10
A programming language gives people a practical way to write instructions that a computer can carry out. Different languages use different words and rules, but all turn ideas into precise actions.
Words for precise instructions
A programming language is a set of words, symbols and rules for writing a program. You can use it to tell a computer what to draw, count or play. The computer does not guess what you meant, so every instruction has to fit the language’s rules.
Why languages are needed
Inside, a computer works with tiny electrical signals, not ordinary sentences. Writing every instruction in that form would be slow and easy to get wrong. Programming languages solve this problem by letting people write clearer commands; another program translates them into forms the computer can use.
A tiny drawing program
Suppose a turtle starts at the centre, facing up. In a block language, you choose “move 40 steps”, then “turn right 90°”, then repeat those two blocks four times. The turtle makes four equal sides and returns to its start: that is a square. The language’s blocks keep each command unambiguous.
A computer is not guessing
It is reasonable to write something that sounds clear to a person, such as “make it nice”, and expect the computer to understand. But “nice” has no exact action attached to it. You must choose details, such as colour, size and position, and write them in the language’s allowed form.
Languages behind everyday tools
Games, drawing apps, websites and traffic lights all use programs written in programming languages. A game uses commands to move characters and check collisions; a traffic light uses them to change colours at the right times. When you learn one language, you are practising a way to express exact ideas.
Keep exploring
Other languages
Loading MyLeoNes™…