![]() |
VOOZH | about |
Computer programming is the process of instructing computers to perform tasks. Itβs the foundation of modern technology, helping beginners understand how computers work, use variables and syntax, and design logical solutions. Learning programming builds problem-solving skills and opens doors to careers in tech.
A computer or any programmable device understands machine language because the computer works on electricity and electricity works on binary numbers (0 and 1). We humans only understand natural language. To fulfill this gap between humans and computers programming language is introduced.
What happens if either human understands machine language, or a machine understands natural language?
If that happens then we don't need to know any programming language to give instructions to machines and anyone can be a programmer if that situation happens.
Also Read:Which Programming Language Should I Choose as a Beginner?
A computer is an electronic device that takes input from the user, processes it, and gives results or responds as per the user. The computer is a programmable computational device.
The components of a computer are:
CPU is known as the brain of the computer system. All the operations within the system are supervised & controlled by the CPU. It interprets and coordinates the instructions. The CPU control all internal & external devices, perform arithmetic and logical operation, controls memory usage, and control the sequence of operation.
Performing all these operations the CPU has 3 sub-units:
By this point, you will know a bit about computers and their components. Also read Basics of Computer and its Operations
Now moving on to the next topic.
Suppose I give you 10 numbers and tell you to find the average of the given 10 numbers, then how do you find the average? You add all those numbers and then divide the sum of the numbers by the total numbers given.
Easy task yeah. Now, if 10 sets and each set contain 10 numbers then what would you do?
For this problem, there are two solutions to solve the problem.
I have used the word procedure many times, what does it mean?
We define a procedure by giving steps one by one to our computer system and we call it a program. Like, taking numbers from a user, adding them, and dividing the sum by the total number is a procedure.
In short, a program is a set of instructions.
Related Article
Variables are sort of containers for storing data values, and it is also memory location for the data type. There are certain rules that need to be followed before declaring them. Variables are generally names allocated to values. The names are alphanumeric, i.e., they have a-z and 0-9. Also, you can use special characters while declaring a variable such as $ or _.
While writing a program be it for a small operation (addition, multiplication) or building an application, you need to require variables. The variable declared for a value should start with an alphabet and later may include numbers or special characters.
Syntax is a set of rules that defines the structure of a language. Every programming language follows a different syntax. A programming language isn't understandable without its syntax. Syntax helps the computer to read and understand the code. It is like giving instructions to the code.
For example,
int a =10;
here a is variable
int is data type
10 is value
Data type is a classification specifying the type of value stored in a variable. It also indicates what type of operation can be applied to it. Data Types are generally classified into two types:
Flow Control Structures are the ways to specify the flow of controls in a program. A program is well clear when control structures are used in it. Its main purpose is to analyze the program.
They are 3 types:
To read more: Flow Control Structures
There are three programming methodologies so far mostly used.
In all these programming methods codes remain the same, and the logic remains the same but one thing changes is how you organize your program code.
The algorithm is a step-by-step procedure for solving computational problems. Programs mean the same, is it?
Every programming language follows a specific syntax that allows us to write code so that it is easily understandable to the machine. Whereas, in the algorithm, we write pseudocode. Pseudocode is an informal language that helps programmers develop algorithms. It is neither in English nor in code.
Let's see pseudocode for the algorithm of an average of numbers.
sum == 0, n= total number of elements
for each element num in list
begin
sum = sum + num
average = sum/x
return average
Learning a programming language before learning any technology is a must, hence, it's very important to have full command of anyone programming language. Choosing anyone programming language instead of going for many is better. Try working on basic problems using different programming languages, and whichever seems easy to you, you can prefer working on that.
If you are planning to learn to program, then you might start with any one of the above.
Must Read: Top 20 Programming Languages to Learn
As learning a new programming language can be a bit difficult task for the newcomers but gives a lot of added advantage in excelling the career. Some of the primary benefits of learning popular programming languages include:
Related Tutorial: