CS Academy
Log inSign up
Back to course

What is programming?

Programming means writing instructions for a computer. That is all. If a recipe is instructions for a cook, a program is a recipe for a computer.

But there is a catch. A computer is extremely fast, and also extremely literal. Imagine telling a robot "make me a sandwich". It would just stand there, because it does not know what bread is. You would have to say: take two slices of bread, put them on the table, open the jar, spread the jam, put the slices together. Computers need that level of detail.

Remember lesson 2? A computer only understands zeros and ones. Writing instructions in zeros and ones would be a nightmare. So people invented programming languages, which look much closer to human language. Another program then translates them into zeros and ones for the computer. Python, JavaScript and C are some famous ones.

We will start with Python, because it is easy to read and very popular: websites, data and artificial intelligence all use it. Here is a tiny Python program:

python

The first line puts the word Sara in a box named name. The second line shows Hello, followed by whatever is inside that box, so the screen says Hello, Sara. Change Sara to your own name, and the computer greets you instead. That is already programming.

Programming is not magic, and it is not only for geniuses. It is just giving clear steps, one by one. In the next course, you will start writing your own programs.

Your turn! Change the code so it prints exactly: Hello, Sara

🤖 Ask the AI tutor

Log in to ask a question

Log in to track your progress