01 Chapter One - Get Started
01 Chapter One - Get Started
CHAPTER ONE
Get Started
Objectives
What is programming?
What is programming language?
How computers understand a programming language?
How to write and run a code?
What is Programming?
Programming is the process of preparing an instructional program for a device to do some task
without making mistakes.
There are two types of languages for communication between a computer and a programmer
(human).
1. Machine language: which is a binary code (series of 0s and 1s) and computers understood it and
it is difficult for humans to understand.
2. Programming language: which is a source code and humans understood it and computers could
not.
A programming language is a formal language, which includes a set of instructions that helps a
programmer to communicate or interact with a computer.
Programming Language is classified into two categories, based on the level (Degree) of abstraction
and gap between source code and machine code.
1. Source code is any collection of code, written using a human-readable programming language,
usually as plain text.
2. Machine code is a computer program written in machine language instructions that can be
executed directly by a computer's control unit.
High level programming languages are those which are programmer friendly. Humans can easily
understand it which helps in easy maintaining and debugging of the code.
Low level programming languages are those which are machine friendly. Humans can’t understand
such languages. In other words, low level languages are not human readable.
What is Interpreter?
An interpreter is a computer program that directly executes instructions written in a programming
language, without requiring them previously to have been compiled into a machine language
program.
Compiler Vs Interpreter
All the programming languages are converted to machine understandable language for execution.
The conversion is taken care of by compilers and interpreters.
A compiler takes the source code and converts it into machine executable code at once. The
processor takes the executable and executes it. The languages which use a compiler are called
compiled languages. Compiled languages are faster and more efficient comparatively.
Examples – Java, C++
An interpreter is one which runs the code line by line and executes instruction by instruction. The
languages which use interpreters are called Interpreted languages. Such languages are slower in
terms of execution and less efficient.
💡 Suppose you want to watch an Italian movie, but you don't understand the Italian language.
However, you can understand English. You have two options to watch the movie. The first way is to
watch an English dubbed version of the movie, if available. The second way is to watch the Italian
movie with English subtitles. In the second way, the subtitles are displayed scene by scene
separately, whereas in the first way, all the scenes are converted to English. We can compare the
first scenario with a compiler and the second one with an interpreter.
What is IDE?
IDE (Integrated Development Environment) is a place (graphic interface) to write, run, and debug
(check errors) code and also convert your source code to machine code.
What is Syntax?
Syntax is set of rules you must follow to run your program correctly. Syntax for each programming
language is unique.
Example:
Mens clothes are cheap.
Men’s clothes are cheap
Key Takeaways