What is a Programming Language and why do we need one??
Programming languages are what we use to tell computers what to do.
Programming languages are a means through which we convey our messages to the electrical systems. It can be a computer, an electronic washing machine, your mobile phones or any electrical device you use.
In Simple Words, Programming Language acts as a bridge Between User and System to communicate.
Do You Know Binary Code of 2 is 10? These represent two states: on (1)and off (0). You Can Convert Your Text From here
Computers talk to one another in binary, which looks like this:
0011101010101111000111
Imagine Whats Happen if no Programming Language in the market
We have to tell a computer to create a red box on the screen for a website.
In English, we say:
Create a box.
Sure, ones with straight edges, curved edges?
Make it red.
Wait to make the edges red or the whole thing red?
Make it fill the screen.
What about the screen?
Screen, the thing I’m looking at.
What are you looking at?
Ohh, forget it.
See the problem now?
The system is not designed to understand Human Language. To Resolve that, We need a Language that communicates with System. So whats does Programming Language do. A programming language allows us to give instructions to a computer in a language the computer understands.
Program is a Set Of instruction that tell the computer what tasks to perform. The rules for writing a format of code and combinations of the set of instructions is called Syntax.
The syntax is similar to Spelling, tense, and punctuation in English to write a sentence.
Types Of Programming Languages
There are 2 Type of Programming Languages:-
1. High-Level Language
2. Low-Level Language
High-level programming languages are easily understandable by a human. It was created by developers so that programmers don’t face any difficulty to communicate with a System. Example:- JS, Python🐍 , and so more.
Low-level languages are designed to deal with the hardware of a computer directly. Low-level languages are closer to the system 💻.
The computer needs a way to understand our program into Binary Code That’s System Understand. To do this, we’ll need a translator.
Translator
A translator is a program that converts your code to the machine language.
Different type of translators
The different kinds of translators are as follows:
Compilers:- It translates the entire program and translates code into Binary code. It generates the error message only after scanning the whole program. Due to this, debugging is comparatively hard, and it takes more time to translate the code. Programming language like C, C++ use compilers.
Interpreter:- It translates code line-By-line. It continuously translates the code until the first error is met. Due to Translate code, line-by-line debugging is easy. It takes less time to convert the code. Programming language like Js, Python, Ruby use interpreters.
Different Way of Writing the Hello World In Programming Language
- Java
public class Hello {
public static void main(String []args) {
System.out.println("Hello World");
}
}
- Python
print "hello world"
- JavaScript
Console.log('hello world');
- C++
#include <iostream> main()
{
std::cout << "Hello, World.";
}
- Bash
#!/bin/sh
echo "Hello World"
- PHP
<?php echo “Hello World”; ?>;
Thank you so much for reading my article on Things to know before starting your first programming language!. Be sure to follow me on Twitter for lots of tweets about tech. Feel free to comment below or tweet me with any questions you may have.
Top comments (0)