Getting to know Python right away – features, advantages, and use cases
Python (hereafter referred to as Python) has an intuitive and concise syntax, and is the most popular language among programmers as well as non-majors.
This is because it is used in various fields such as web programming, machine learning at the center of the 4th industrial revolution, Internet of Things (IoT), and data analysis beyond simple utility creation, and it is in close contact with the latest trends.
Below, we will learn about the features, advantages, and use cases of Python.
Introduction to Python
Python is a language developed by a programmer named Guido van Rossum in 1991. It has the characteristics of being able to learn faster than other programming languages thanks to its easy-to-read and easy syntax. Thanks to this, it has gained popularity mainly among non-programmers who do not major in programming, and is being used in various fields from statistics dealing with data analysis and modeling to medicine using deep learning and artificial intelligence.
In the TIOBE index, which surveys programming language preference based on search volume, Python ranked 3rd (10.86%) as the preferred programming language as of February 2021. In one programming language ranking, Python has the most usage, beating Java and C++.
Features of Python
Features 1. Script language
Python is a script language in which an interpreter (interpreter) reads source code line by line and executes it immediately without compilation. As a result, no compilation process is required, so you can easily write code while checking and modifying the execution result.
What is the difference between a compiled language and a scripting language?
A compiled language is a language that translates and executes code written by a programmer (human) into machine language through a process called 'compilation'.
On the other hand, a script language refers to a language in which the interpreter reads the source code line by line and immediately executes it without a separate 'compilation' process.
Compiled languages take a relatively long time to execute and modify because the source code has to go through the process of compiling, but once translated into machine language, it shows fast execution speed. Because scripting languages run directly without compiling, the results can be checked and modified quickly, but translation and execution are performed at the same time, so the execution speed is slower than that of compiled languages.
Feature 2. Dynamic typing
Python is a dynamically typed language. You can specify a value by simply declaring the variable without specifying the data type. In this case, the data type of the variable is determined at the time the code is executed. It has the advantage of not having to go through a cumbersome process when converting data types, but there is a feature that errors due to unexpected types may occur during code execution.
What is the type (data type) of a variable?
It means that the type of data to be stored in a specific variable is defined in advance. Data types are largely divided into letters and numbers , and numbers are subdivided into integers and real numbers . The value to be stored in a specific variable is divided by type to correspond to the type (data type) of the variable.
In the case of a statically typed language , the programmer must specify the type (data type) of the data to be entered into the variable, and the type of the variable is determined at compile time. On the other hand, in the case of a dynamically typed language , you can specify a value by declaring only a variable without having to declare the type (data type) of the variable in advance.
Feature 3. Platform-independent
Python works in most Operating Systems (OS), such as Linux, Unix, Windows, and Mac. Since there is no need to compile for each operating system, you can write the source code once and use it on any operating system.
Advantages of Python
Advantages 1. Concise and easy grammar
Python has a syntax similar to human thinking. Therefore, it is possible to learn Python grammar without spending a lot of time, and even people who do not major in programming can learn and use Python within a few days.
The example below shows how easy and concise Python syntax is compared to other programming languages.
EXAMPLE 1. PRINT A SIMPLE PHRASE (HELLO, GABIA!)
Comments