python introduction

                                                               

What is Python?

  • Python is an open source, object-oriented, high-level powerful programming language.
  • Developed by Guido van Rossum in the early 1990s. Named after Monty Python
  • Python runs on many Unix variants, on the Mac, and on Windows 2000 and later.
  • It is used for:

    • web development (server-side),
    • software development,
    • mathematics,
    • system scripting.

    What can Python do?

    • Python can be used on a server to create web applications.
    • Python can be used alongside software to create workflows.
    • Python can connect to database systems. It can also read and modify files.
    • Python can be used to handle big data and perform complex mathematics.
    • Python can be used for rapid prototyping, or for production-ready software development.

    Why Python?

    • Python works on different platforms (Windows, Mac, Linux, Raspberry Pi, etc).
    • Python has a simple syntax similar to the English language.
    • Python has syntax that allows developers to write programs with fewer lines than some other programming languages.
    • Python runs on an interpreter system, meaning that code can be executed as soon as it is written. This means that prototyping can be very quick.
    • Python can be treated in a procedural way, an object-oriented way or a functional way.

    Good to know

    • The most recent major version of Python is Python 3, which we shall be using in this tutorial. However, Python 2, although not being updated with anything other than security updates, is still quite popular.
    • In this tutorial Python will be written in a text editor. It is possible to write Python in an Integrated Development Environment, such as Thonny, Pycharm, Netbeans or Eclipse which are particularly useful when managing larger collections of Python files.

    Python Syntax compared to other programming languages

    • Python was designed for readability, and has some similarities to the English language with influence from mathematics.
    • Python uses new lines to complete a command, as opposed to other programming languages which often use semicolons or parentheses.
    • Python relies on indentation, using whitespace, to define scope; such as the scope of loops, functions and classes. Other programming languages often use curly-brackets for this purpose.
    • Features of Python

      Open source: Python is publicly available open source software, any one can use source code that doesn't cost anything.

      Easy-to-learn: Popular (scripting/extension) language, clear and easy syntax, no type declarations, automatic memory management, high-level data types and operations, design to read (more English like syntax) and write (shorter code compared to C, C++, and Java) fast.

      High-level Language:
      High-level language (closer to human) refers to the higher level of concept from machine language (for example assembly languages). Python is an example of a high-level language like C, C++, Perl, and Java with low-level optimization.

      Portable:
      High level languages are portable, which means they are able to run across all major hardware and software platforms with few or no change in source code. Python is portable and can be used on Linux, Windows, Macintosh, Solaris, FreeBSD, OS/2, Amiga, AROS, AS/400 and many more.

      Object-Oriented: Python is a full-featured object-oriented programming language, with features such as classes, inheritance, objects, and overloading.

      Python is Interactive :
      Python has an interactive console where you get a Python prompt (command line) and interact with the interpreter directly to write and test your programs. This is useful for mathematical programming.

      Interpreted : Python programs are interpreted, takes source code as input, and then compiles (to portable byte-code) each statement and executes it immediately. No need to compiling or linking

      Extendable : Python is often referred to as a "glue" language, meaning that it is capable to work in mixed-language environment. The Python interpreter is easily extended and can add a new built-in function or modules written in C/C++/Java code.

      Libraries : Databases, web services, networking, numerical packages, graphical user interfaces, 3D graphics, others.

      Supports :Support from online Python community

      Python Interpreter

      • In interactive mode, type Python programs and the interpreter displays the result:
      • Type python into your terminal's command line
      • After a short message, the >>> symbol will appear
      • The above symbol signals the start of a Python interpreter's command line.
      • Python interpreter evaluates inputs (For example >>> 4*(6-2) return 16)


Comments

Popular posts from this blog

Two Sum II - Input Array Is Sorted

Comparable Vs. Comparator in Java

Increasing Triplet Subsequence