What is computer programming?
Computer programming is the process of designing and building an executable(to run a file directly from your computer) computer program to accomplish a specific computing result or to perform a particular task.
Algorithm for computer programming
What is a computer program?
A computer program is a sequence of instructions in a programming language that a computer can execute or interpret. Or a set of instructions.
A computer program is written in a file with the file extension of the programming language is being written on; E.g. py = Python, js = Javascript, cpp = c++, java = Java; test.py, test.js, test.java, test.cpp etc.
A computer program ( source code: a text listing of commands to be compiled or assembled into an executable computer program) written in Python
The two important terms we are going to discuss in simple definitions are:
sequence of instructions
In programming, the sequence is a basic algorithm; a set of logical steps carried out in order.
Computers need instructions in the form of algorithm to complete the desired task, and this algorithm must have the correct order of steps or sequence.
Computer Programming Language
A programming language is a formal language comprising of a set of strings (texts) that produce various kinds of machine code output. programming languages are one of a kind computer language that are used in computer programming to implement algorithms. Most programming languages consist of instructions for computers.
Explanation:
To understand these terms, consider a situation when someone asks you about how to go to a nearby supermarket, say, Mr. Biggs. what exactly do you do to tell him/her the way to go to Mr. Biggs?
you will use Human Language like English Language, right? or Spanish, Hausa, Ijaw etc. whichever language you both can understand perfectly.
For English language, something as follows:
- Go left
- Take a turn
- Go straight
- Drive 2 kilometres
- Look for Mr. Biggs on your left side
now, try to map the situation with a computer program. The above sequence of instructions is a Human language written in the English Language, which instructs on how to reach Mr. Biggs from a given starting point. This same sequence of instructions could have been written in Spanish, Ijaw, Igbo, Hindu, Arabic or any other other Human language both can communicate with effectively.
Now, lets go back and try to understand what a computer program is; which is a sequence of instructions written in a computer language to perform a specified task by the computer.
For example, the instructions given earlier can be used by anybody seeking direction to Mr. Biggs, it can be placed on a signpost for people to see.
The following is a simple program written in Python Programming Language:
The above computer program instructs the computer to print "Hello World" on the computer screen.
A computer program is also called a computer software, which can range from two lines of code to hundreds of lines of code(instructions).
Computer program instructions are also called program source code and computer programming is also called program coding.
A computer without a computer program is empty, it is programs that make computers active.