A Beginner’s Guide to Python: History, Features, and Advantages

A Beginner’s Guide to Python: History, Features, and Advantages

What is python ?

Python is a high-level, general-purpose, object-oriented programming language.

high-level \= it is just in simple English

general-purpose = it is used for developing different types of software and applications

object-oriented = it is a programming paradigm, which means it is just a set of rules and regulations

History :

    • The Python programming language was conceived in the 1980s.

      • The implementation of the Python programming language began in 1989.

      • The first version of Python was released in 1991.

      • The second version of Python was released in 2000.

      • The third version of Python was released in 2008.

      • The Python programming language was developed by a Dutch programmer named Guido van Rossum.

      • Python was developed at the research center CWI (Centrum Wiskunde & Informatica).

      • The Python language is written in the C language.

      • Python is a product of the PSF (Python Software Foundation)

Python Features :

What are Python features?

Python features are simply the facilities provided by the Python language to developers.

  1. simple :

    Python is a high-level language; it is in simple English. The syntax of Python is easy compared to other languages like C, C++, and Java.

  2. Automatic memory management:

    This means when you create a variable, Python automatically allocates memory, and if you no longer need that memory, it is deleted automatically. This function is not available in other languages.

  3. free and open source:

    Python software is free to download. Python software is available at python.org. Open source means the code is available to the public, and anyone can use that code to create new technologies like Jython, IronPython, and MicroPython.

  4. Large standard libraries:

    Libraries mean predefined programs with predefined functionality. They make application development easy (less coding). Python provides a large number of libraries.

  5. Dynamic :

    It means it does not require the declaration of data types. They are not fixed. The advantage of a dynamic programming language is that the programmer does not need to worry about declaring data types.

  6. Platform independent:

    WORA - Write Once, Run Anywhere

    CORA - Compile Once, Run Anywhere

    In a platform-independent language, the development and execution environments don't need to be the same.

    For example, if you write code on a Windows operating system, that code can also run on other operating systems.

  7. portable :

    Your Code is Run any type of OS without any modification.

  8. object oriented :

    Object-oriented is not a language; it's a programming paradigm. A programming paradigm is a set of rules and guidelines.

  9. extensible :

    You can integrate Python into other programs as a scripting engine.

  10. embeddable :

    You can add more features to it.

  11. interpreter:

    Python is an interpreted language. Python source code is translated and executed line by line. The Python compiler generates byte code, and the Python interpreter (PVM) converts it into machine or binary code.

    What are the advantages of open source:

    1. Develop new Python technologies like Jython, MicroPython, IronPython, RubyPython, etc.

    2. allows integration with existing technologies.

      Note :

      All Python libraries are in one repository or location: pypi.org. PyPI stands for Python Package Index.

How many types of programming languages are there?

There are two main types of programming languages:

  1. Statically typed programming languages:

    C, C++, and .NET C# are called statically typed programming languages.

    eg: int a = 6;

    If you write only a = 6;, it's wrong.

    In statically typed programming languages, it is required to declare the data type, and it is fixed.

  2. Dynamically typed programming languages:

    In dynamically typed programming languages, data representation is not required and it is not fixed.

    eg: a = 6; a = 1.6;

    The advantages of dynamically typed programming languages are that the programmer does not need to think about the declaration of data type.

What is the difference between platform-dependent and platform-independent?

In platform-dependent, the development and execution environment are the same, but in platform-independent, the development and execution environment may not be the same.

Why are C and C++ called platform-dependent languages?

C and C++ are called platform-dependent languages because they generate binary or machine code that runs only on the operating system it was created for. This means if you make an application on a Windows operating system, the executable code will not run on other operating systems.

and data representation in C and C++ changes from one OS to another OS.

What are the problems with platform-dependent languages:

  1. Need to develop the same application for multiple OS

  2. Increases development cost

    What is a translator?

    A translator basically converts one language into another language.

    There are two types of translators:

    1. Interpreter:

      An interpreter is a translator that converts the code line by line and provides one error at a time.

    2. Compiler :

      A compiler executes the whole program and shows more than one error.

What is PVM?

PVM stands for Python Virtual Machine. It basically interprets the bytecode into machine code.

What is bytecode?

Bytecode is basically compiled code. It is not 0's and 1's; it is mnemonic code, meaning it is a verb or code. It is platform-independent code.

What is the difference between binary and bytecode?

The difference between binary and bytecode is:

Binary code: It is platform-dependent code. It does not require a translator. Binary code runs only on the same OS, not on others.

Bytecode: It is platform-independent code. It requires a translator. Bytecode can run on any OS.

Note:

In Python, data representation is not fixed; it is dynamic.