Skip to content
Home » PYTHON JUMPSTART COURSE Section 1 – Introduction, Lesson 2 – About the Python Programming Language

PYTHON JUMPSTART COURSE Section 1 – Introduction, Lesson 2 – About the Python Programming Language

Spread the love

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

Python was developed by Guido van Rossum at the National Research Institute for Mathematics and Computer Science in the Netherlands.

The first version of Python (0.9.0) was published in 1991. Version 1.0 was released in 1994. In 2000 Python 2.0 was introduced. Version 3.0 was released in 2008.

Python source code is now available under the GNU General Public License (GPL).

The Features of Python

– Python is interpreted – it’s processed at runtime by the interpreter, without any need to be compiled before running it.

– Python can be used as a scripting language or can be compiled to byte-code when you are working on a larger-scale application.

– Python is interactive – you can interact with the interpreter directly to write code.

– Python supports both the functional programming paradigm and the object-oriented programming paradigm that encapsulates code within objects.

– Python provides dynamic data types and supports dynamic type checking.

– Python is concise – Python code is significantly smaller than its equivalent C++/Java code.

– Python supports all major databases.

– Python is versatile – it supports the development of a wide range of applications like desktop apps, web apps, data mining, machine learning and games among others.

– Python is easy for beginners – it has simple structure, not too many keywords, clear syntax, fewer syntactical constructions than many other languages; it often uses English keywords where other languages use punctuations

– Python is designed to be highly readable.

– Python is designed to be highly maintainable.

– Python is portable – it runs on many platforms and has the same interface.

– Python is extendable – you can add low-level modules to the interpreter and so tweak your tools.

– Python manages garbage collection.

– Python can be easily integrated with C, C++, Java and other programming languages.

The Zen of Python

  • Beautiful is better than ugly.
  • Explicit is better than implicit.
  • Simple is better than complex.
  • Complex is better than complicated.
  • Flat is better than nested.
  • Sparse is better than dense.
  • Readability counts.
  • Special cases aren’t special enough to break the rules.
  • Although practicality beats purity.
  • Errors should never pass silently.
  • Unless explicitly silenced.
  • In the face of ambiguity, refuse the temptation to guess.
  • There should be one — and preferably only one — obvious way to do it.
  • Although that way may not be obvious at first unless you’re Dutch.
  • Now is better than never.
  • Although never is often better than *right* now.
  • If the implementation is hard to explain, it’s a bad idea.
  • If the implementation is easy to explain, it may be a good idea.
  • Namespaces are one honking great idea — let’s do more of those!

Python 3 is not backward compatible with Python 2. The emphasis in Python 3 had been on the removal of duplicate programming constructs and modules so that “There should be one — and preferably only one — obvious way to do it” as mentioned above.

In order to write clear and efficient code, it’s good to follow the Python style guidelines (PEP8). It’s not obligatory, but definitely good practice.

We will refer to the PEP8 guidelines throughout the course when needed.

QUIZ

1. Python is:
    A) interpreted
    B) compiled
 
2. Python 3 is not:
    A) portable
    B) extendable
    C) backward compatible with Python 2
 
3. The Python style guidelines are called:
    A) PY3
    B) PEP3
    C) PEP8
 

True or False?

1) Python is a high-level  general-purpose interpreted, interactive, object-oriented, and high-level programming language.
2) Python supports only the object-oriented programming paradigm.
3) Python code is significantly smaller than its equivalent C++/Java code.
4) Python manages garbage collection.

SOLUTION

QUIZ

1. Python is:
    A) interpreted
    B) compiled
 
2. Python 3 is not:
    A) portable
    B) extendable
    C) backward compatible with Python 2
 
3. The Python style guidelines are called:
    A) PY3
    B) PEP3
    C) PEP8

True or False?

1) Python is a high-level  general-purpose interpreted, interactive, object-oriented, and high-level programming language.
True
2) Python supports only the object-oriented programming paradigm.
False
3) Python code is significantly smaller than its equivalent C++/Java code.
True
4) Python manages garbage collection.
True  

Spread the love

Leave a Reply