So, Python is a high level, interpreted, general purpose programming language. It was created in 1991 by Guido Van Rossum. It emphasized on code readability.
So, basically there are 2 types of language: high level and low level language. The low level language are close to Computer, so they are difficult to code but have other advantages. As python is a high level language so it is relatively easy to develop in python.
Compied vs interpreted language
There are 2 types of language on the basis of language on the basis of basically how we run the the program: compiled and interpreted languages.
In the simple terms, compiled language are run in one go or the whole program will run in one time only if there are no errors.
Below is a simple code in C++. note that i made 2 errors or mistakes on purpose. You don’t need it worry if you didn’t understand the code, basically there are 7 statements that prints a simple message. I made error in 5th and 6th line.
std:cout << ” hello world!”;
cout< “welcome to betaPython”;
std::cout << “by kashish Nagpal ” return 0;
C++ (compiled language) output
Note: that it shows 2 errors and didn’t produce any output. In compiled languages the program in fully analysed and compiler detect if there is any error or not .If there are any error then the compiler will give the error along wth line number. After removing all the errors the program will run or give output.
Now below is a code in Python which is an interpreted language. basically it’s the same code that I have written in C++. it prints two statements but there are two errors in the program.
print(betaPython by kashish Nagpal)
Note: in this program, the interpreter first analyse the program line by line. it analyse first line then it give the output and analyse the second line and so on. So, it gives the output of the 1st line (no output) i.e. it prints the statements 6. As there is error in 3rd and 3th line but it only shows one error that is in the 3rd line. after we remove the error in the 3rd line, then it analyse the third line and if there is any error it will point it out.
uses of Python
- Web development
- Data science
- Video game development
- Desktop GUI (graphical user interface)
- Software development
Pros /advantages of python
- Easy to learn
- Extensive libraries
- Iot (internet of things)
- Easy to develop software
- One of the popular language
- One of the widely used Programming language
main products built using python
Next article: how to install python in android, iOS, MAC OS, windows, Linux