p

python tutorial - Python | The new generation Language - learn python - python programming



Python designed by Guido van Rossum at CWI has become a widely used general-purpose, high-level programming language.

Prerequisites:

Knowledge of any programming language can be a plus.

Reason for increasing popularity

  1. Emphasis on code readability, shorter codes, ease of writing
  2. Programmers can express logical concepts in fewer lines of code in comparison to languages such as C++ or Java.
  3. Python supports multiple programming paradigms, like object-oriented, imperative and functional programming or procedural.
  4. There exists inbuilt functions for almost all of the frequently used concepts.
  5. Philosophy is “Simplicity is the best”.

LANGUAGE FEATURES

  • Interpreted
    • There are no separate compilation and execution steps like C and C++.
    • Directly runthe program from the source code.
    • Internally, Python converts the source code into an intermediate form called bytecodes which is then translated into native language of specific computer to run it.
    • No need to worry about linking and loading with libraries, etc.
  • Platform Independent
    • Python programs can be developed and executed on multiple operating system platforms.
    • Python can be used on Linux, Windows, Macintosh, Solaris and many more.
  • Free and Open Source; Redistributable
  • High-level Language
    • In Python, no need to take care about low-level details such as managing the memory used by the program.
  • Simple
    • Closer to English language;Easy to Learn
    • More emphasis on the solution to the problem rather than the syntax
  • Embeddable
    • Python can be used within C/C++ program to give scripting capabilities for the program’s users.
  • Robust:
    • Exceptional handling features
    • Memory management techniques in built
  • Rich Library Support
    • The Python Standard Library is vary vast.
    • Known as the “batteries included” philosophy of Python ;It can help do various things involving regular expressions, documentation generation, unit testing, threading, databases, web browsers, CGI, email, XML, HTML, WAV files, cryptography, GUI and many more.
    • Besides the standard library, there are various other high-quality libraries such as the Python Imaging Library which is an amazingly simple image manipulation library.

Python vs JAVA

Python Java
Dynamically Typed1.No need to declare anything. An
assignment statement binds a name to an object, and
the object can be of any type.2.No type casting
required when using container objects
Statically Typed 1.All variable names (along with their types) must be explicitly declared. Attempting to assign an object of the wrong type to a variable name triggers a type exception.2.Type casting is required when using container objects.
Concise Express much in limited words VerboseContains more words
Compact Less Compact
Uses Indentation for structuring code Uses braces for structuring code

The classical Hello World program illustrating the relative verbosity of a Java Program and Python Program

Java Code

public class HelloWorld
{
    public static void main (String[] args)
    {
        System.out.println("Hello, world!");
    }
}
click below button to copy the code. By Python tutorial team

Python Code

print "Hello, world!"
click below button to copy the code. By Python tutorial team
print ("Hello, world!") # Python version 3
click below button to copy the code. By Python tutorial team

Similarity with Java

  • Require some form of runtime on your system (JVM/Python runtime)
  • Can probably be compiled to executables without the runtime (this is situational, none of them are designed to work this way)

LOOK and FEEL of the Python

Python - The new generation Language Python - The new generation Language

Currently, there are two versions of Python available Python 2 and Python 3. Many beginners must be wondering with which version of Python they should start. My answer to this question is usually something along the lines “just go with the version your favourite tutorial is written in, and check out the differences later on.”

Softwares making use of Python

Python has been successfully embedded in a number of software products as a scripting language.

  1. GNU Debugger uses Python as a pretty printer to show complex structures such as C++ containers.
  2. Python has also been used in artificial intelligence
  3. Python is often used for natural language processing tasks.

Current Applications of Python

  1. A number of Linux distributions use installers written in Python example in Ubuntu we have the Ubiquity
  2. Python has seen extensive use in the information security industry, including in exploit development.
  3. Raspberry Pi– single board computer uses Python as its principal user-programming language.
  4. Python is now being used Game Development areas also.

Pros:

  1. Ease of use
  2. Multi-paradigm Approach

Cons:

  1. Slow speed of execution compared to C,C++
  2. Absence from mobile computing and browsers
  3. For the C,C++ programmers switching to python can be irritating as the language requires proper indentation of code. Certain variable names commonly used like sum are functions in python. So C, C++ programmers have to look out for these.

Industrial Importance

Most of the companies are now looking for candidates who know about Python Programming. Those having the knowledge of python may have more chances of impressing the interviewing panel. So I would suggest that beginners should start learning python and excel in it.


Wikitechy tutorial site provides you all the learn python , free python online course , best online course to learn python , learn how to program in python python training free

Related Searches to Python The New Generation Language