What type of language is python? Programming or scripting?
After this question probably you are wondering what is the difference between programming and scripting language?. The only difference which exists is that the scripting language does not require any compilation, it is directly interpreted. The interpreter is used mostly for scripting languages like python.
For example, the programs written in a language such as C++ are compiled before execution while the programs written in scripting languages such as Python or JavaScript are directly interpreted and are not compiled.
Python is scripting language
, but in general sense, it is considered as a general-purpose programming language. A scripting language is a programmings language that supports scripts.
Scrips
A python script contains python code and the file name ends with .py which can be executed from the command python filename.py
For example a python program can be executed in two ways:
- Through the Python terminal (called interactive mode).
- Through scripting (using files).
The first method is highly impractical for larger and more complicated programs.
Therefore, for larger programs we use method 2 called scripting. In this method, we write the Python program in Notepad and then save the program with a .py extension.