Python #Class1

Python was created by Guido Rossum in 1989 and has become one of the fastest growing language. It is an interpreted, object-oriented, high level programming language with dynamic semantics.

DIFFERENCE BETWEEN INTERPRETER AND COMPILER

Interpreter read each line again and again and if there is an issue, it returns back the error to the user then and there. But, with compiler the entire program gets checked and then the errors are returned towards the end!

WHO USES PYTHON

There are eight companies that use Python extensively –

  1. YouTube – It is one of the most popular video sharing platform and there Python is used extensively as scripting and programming language.
  2. Google – It uses Python for better web search engine.
  3. NASA – It uses Python for scientific tasks.
  4. NSA – They make use Python for cryptographic analysis.

Python Features –

  1. Simple and Easy to Learn – It uses English and when you check out other programming language, it is easier to understand its code!
  2. Free and Open Source – Python is an example of FLOSS ( Free/Libre and open source software). This simply means that it can distribute copies of this software, read it source code, modify it etc.
  3.  High-level programming language – The code can be easily written in English but can be converted to the low level language for the machine to read and understand.
  4. Portability – it is supported by all the platforms like Linux, play stations.
  5. Paradigms – Python supports procedural and object oriented style of writing programs.
  6. Extensible – Python can invoke C,C++ or dot net objects!

OPERATORS IN PYTHON

There are seven types of operators in Python –

  1. Arithmetic Operator
  2. Assignment Operator
  3. Comparison Operator
  4. Logical Operator
  5. Bitwise Operator
  6. Identity Operator
  7. Membership Operator

Python is a loosely typed language. Therefore, there is no need to define the data type of the variables and there is no need to declare them before using them!

Following are the types of the data types –

  1. Mutable – List, dictionaries and sets
  2. Immutable – Numbers, strings and tuples

IMMUTABLE DATA TYPES

If a value is assigned to this data type, its value cannot be changed.

MUTABLE DATA TYPES

If the value is assigned to this data type, its value can be changed.

Happy Learning 🙂



Leave a comment