1. What is an Instruction?
In general terms:
The definition of instruction is the act of educating, giving the steps that
must be followed or an order.
In computing terms:
• An instruction is an order given to a computer processor by a
computer program.
• At the lowest level, each instruction is a sequence of 0s and 1s that
describes a physical operation the computer is to perform (such as
"Add")
2. What is a Program?
• A program is a set of instructions that a computer uses to perform a
specific function.
• To use an analogy, a program is like a computer’s recipe. It contains a
list of ingredients (called variables, which can represent numeric data,
text, or images) and a list of directions (called statements)
• These statements (called instructions) tell the computer how to
execute a specific task.
3. How to create a Program?
In Simple steps:
Picking the language
• There are many different programming languages.
• The programming language is what decides the rules and
structure (syntax) of your program.
Deciding on an editor
• An editor is any program that allows you to write computer
code.
• They range from simple, like a basic text editor, to advanced
software, such as Adobe Dreamweaver, Eclipse, JDeveloper,
or Microsoft Visual Studio.
4. How to create a Program?
Compiler
Most computer programming languages are high-level
programming languages, meaning they are easy for you to
understand.
But impossible for a computer to understand. For the computer
to "read" your program.
It must be compiled or have an interpreter.
NOTE: Your choice of programming language is the deciding
factor on whether you'll need a third-party program to compile
or interpret it.
5. How to create a Program?
Learning the language
• After you have decided on a programming language, editor,
and compiler, you are ready to program.
• For most users, the easiest way to start is with the famous
"Hello World!" program.
• After you have run your program that prints "Hello World!" to
the screen, the next step is to learn the language's syntax.
6. To do so, you need to understand the
following concepts:
• A statement is a single line of code.
• Understand how to declare variables.
• Create conditional statements (e.g., if, elsif, and else).
• Learn about data structures like a string, array, or hash.
• Perform loops (e.g., do, for, while...etc).
• How to make comments or temporarily disable parts of
the code.
• Learn more about algorithms.
• Understand regular expressions.
7. What is a Programming Language?
• Programming − When a specific program is to be determined, it is
essential to design statements or instructions for the computer to
carry out. The art of writing instructions for a computer to
determine a particular task is called programming.
• Language − A language is defined as the set of all possible strings,
words or sentences that can be derived from a given alphabet.
• Programming Language − A programming language is a
computer language that can be used by programmers (developers)
to connect with computers. It is a set of instructions written in any
language (C, C++, Java, and Python) to implement a definite task.
• A programming language can create desktop applications,
websites, and mobile applications.
8. Types of Programming Languages:
• Low-Level Programming Languages
1. Machine Language
2. Assembly Language
• High-Level Programming Languages
1. Procedural-Oriented Programming Language
2. Object-Oriented Programming Language
3. Functional Programming Language
4. Problem-Oriented Programming Language
5. Scripting Programming Language
6. Artificial Intelligence Programming Language
9. Low Level Programming Language
• Low-Level Programming Languages are very close to the machine and are also known
as Computer-Friendly Languages. These are the Programming Languages with very
less or no abstraction at all.
• Low-Level Programming Languages are the hardest languages to understand by
programmers and need a really good knowledge of Computer Architecture and it’s
working.
There are 2 types of Low-Level Programming Languages available, which are
discussed below:
1. Machine Language
• Machine Language is also known as the First-Generation Programming Language
(1GL).If you already know the working of Computer, then you can easily understand
the working of Machine Language as well.
• When you will take a deep look inside your computer, you will see nothing but just a
series of transistors, which are used for holding and releasing a charge. In simple
words, a Computer is a cluster of millions and millions of switches, which can be either
turned ON or OFF at a very high rate. These two states (ON and OFF) can also be
defined as 1 and 0 which is called Binary Code.
• A computer just understands the language of 0s and 1s (Binary Code).Since Machine
Language doesn’t need a Compiler, Interpreter, or any type of program to convert its
code. So, it is the fastest Programming Language.
10. 2. Assembly Language
• Assembly Language is also known as Second Generation Programming Language
(2GL).It is another Low-Level Programming Language and the second closest
language to the Computer.
• Assembly Language is slower as compared to the Machine Language. However, it
is very fast when compared to High-Level Programming Languages (like – C, C++,
Java).
• Unlike Machine Language, the Assembly Language need a program (called
Assembler) to convert its Assembly Code to Machine Code.
• Programming in Assembly Language is comparatively much easier as compared to
working with Machine Language.
11. High Level Programming Language
• High-Level Programming Languages are also known as humans or
programmers-friendly languages.Here, the level of abstraction is much
higher as compared to Low-Level Languages.
• In order to run a program written in a high-level language, we need a
compiler or interpreter, which will convert the code written in High-Level
Language to the Low-Level Language (Assembly Code > Machine Code).
• Since High-Level Programming Languages are very easy to understand
and work with.
• So, almost all programmers use High-Level Programming Languages for
writing the code or creating a program.
12. There are 6 types of High-Level Programming
Languages available, which are discussed below:
1. Procedural-Oriented Programming Language:
• The main goal of Procedural-Oriented Programming is to solve a problem. So, data is the second
priority in Procedural-Oriented Programming, as a result, this Programming Paradigm is
comparatively less secure.
• In Procedural Oriented Programming, we create several statements in order to solve any problem. It
uses a Top-Down approach in order to solve any problem.
• Examples of Procedural-Oriented Programming Language: Basic, Fortran, C, Pascal, and COBOL.
2. Object-Oriented Programming Language
• Object-Oriented Programming is the most realistic programming approach for solving Real-World
problems.
• Here, every problem is viewed as an entity or object, by which the designing of the program becomes
simpler and easier.
• Some of the basic concepts of Object-Oriented Programming are Object, Class, Inheritance,
Abstraction, Polymorphism, and Encapsulation.
• Examples of Object-Oriented Programming Language: Java, Python, C++, C#, JavaScript, and PHP.
13. 3. Functional Programming Language
• Functional Programming is a style of programming, where functions are treated and used just like
variables. Therefore, Functional Programming Language is also known as the First-Class Function.
• In Functional Programming, the data is immutable, which means that once the data is created, it cannot
be changed, and we must create a separate variable instead of changing the old one.
• Another goal of Functional Programming is to keep the Data separate from the Function.
• Examples of Functional Programming Language: Haskell, Scala, Python, Clojure, and Swift.
4. Problem-Oriented Programming Language
• Problem-Oriented Programming Language is also known as Fourth Generation Programming Language (4GL) or
Result Oriented Programming Language.
• Here, you can directly insert or retrieve the result or data without caring about the procedural or
getting into the actual complexity of the program.
• It is usually used for managing the Databases. Here, the priority is given to the data only.
• Examples of Problem-Oriented Programming Language: Fortran, COBOL, Pascal, and GPSS.
5. Scripting Programming Language
• Scripting Language is the Programing Language which is used for performing automation or repetitive
task with the help of scripts.
• Unlike, other Programming Languages, Scripting Languages are Run-Time Programming Languages.
• Web Automation or Web Scripting is one of the applications of Scripting Language.
• You can also automate your daily task on a computer, with the help of Shell Script or Bash Script,
which is another most popular example of Scripting Language.
• Examples of Scripting Programming Language: Bash, JavaScript, Shell, Python, and Perl.
14. 6. Artificial Intelligence Programming Language
• Artificial Intelligence Programming Language is also known as Fifth Generation Programming Language
(5GL) or Natural Language.
• In Fifth Generation Programming Languages, the code will be written in the form of normal sentences,
as we use in normal communication with others.
• So, unlike other Programming Languages, here we don’t need any logic or algorithm to create a program.
• So, even a non-programmer will also be able to tell a computer what to do and the computer will
perform all the tasks on its own.
• However, Artificial Intelligence Language is still in its development phase and a lot of research is
still going on in its development.
15. The famous "Hello World!" program.
A "Hello, World!" program is generally a computer program
that outputs or displays the message "Hello, World!". This
program is very simple to write in many programming
languages.
In various languages:
C:
#include <stdio.h>
int main(void)
{
printf("Hello, World!n");
return 0;
}
C++:
#include <iostream>
int main()
{
std::cout << "Hello, World!n";
return 0;
}
16. C#:
Console.WriteLine("Hello, World!");
JAVA:
class Main
{
public static void main(String[] args)
{
System.out.println("Hello, World!");
}
}
JAVASCRIPT:
document.write('Hello World');
PYTHON:
print("Hello, World!")
RUBY:
puts "Hello, World!“
BATCH FILE:
@echo off
echo Hello, World!