A computer is a machine that processes information under the control of a program.
By seeing the computer as a machine, you can then come to appreciate it like any device around you.
What however makes the computer special is the fact that you can program it.
What is Programming?
Computer programming is a way of giving computers instructions about what they should do in order to complete a set task.
A computer program will have the ability to take input data from a device such as a keyboard, process calculations, and make decisions based on certain conditions.
The practice of programming is one of teaching the computer to do something.
You must know how to do it yourself before you can teach a computer to do it for you.
The instructions to execute the task that you want the computer to do for your are given to it in a programming language.
A programming language is a language that the computer understands.
Using a programming language, you are then able to transfer the logic of how you solved a problem to the computer.
To learn a programming language, you should be able to do the following with it:
- Take inputs
- Produce outputs
- Declare variables
- Use mathematical expressions
- Use conditional statements such as IF/ELSE
- Using looping statements such as WHILE
- Write functions
The Purpose of Programming
The purpose of programming is to automate processes.
When we have a problem that we want to solve, we list out the steps to solve that problem.
The sequence of steps we create is the algorithm.
The algorithm embodies all the logic we need to solve a problem.
With a well designed algorithm, we are confident that if we follow the steps of the algorithm, the result will always be correct.
We then take this algorithm and express it in a programming language as a program.
Once we have the program, the computer will handle the task for us.
We can then free up the time for our task until something goes wrong or we need to update the program’s logic.
This is the essence of programming.
Programming is a task that deals with the automation of the solution to a problem.
It is difficult hence the need to understand why it is needed before you do it.
Learn Python in One Week
If you want a quick and easy introduction to the Python programming language, you should check out my fifth book: Learn Python in One Week on the Amazon store.