absolute basics - Hsanokklis/2023-2024-Tech-journal GitHub Wiki

Compilation vs Interpretation

COMPILATION

The source program is translated by getting a file containing the machine code. The program that performs this translation is called a compiler or translator.

INTERPRETATION

The source code is read by an interpreter so that it can be executed. It interprets the code every time it is intended to be executed.

  • source code is usually place in text files as a computer program is a piece of text
  • source code has to be pure text - no fonts, colors, link etc.

The interpreter first checks the text for any errors, then it reads the code from top to bottom and from left to right.

Advantages and Disadvantages

image

image

Python is an interpreted language

Python (all the stuff)

Python is a widely-used, interpreted, object-oriented, and high-level programming language with dynamic semantics, used for general-purpose programming

Named after Monty Python's Flying Circus!

Python was created by Guido Van Rossum and he defined this goals in his creation of the language:

  • an easy and intuitive language just as powerful as those of the major competitors
  • open source, so anyone can contribute to its development
  • code that is as understandable as plain English
  • suitable for everyday tasks, allowing for short development times

Python is the most popular programming language in the world

Why is Python Special

  • Its easy to learn
  • Its easy to teach
  • Its easy to use
  • Its easy to understand
  • Its east to obtain, install and deploy

Python Rivals

  • Perl - resembles some of the old languages derived from the C programming language

  • Ruby - more innovative and newer then python

Python falls in the middle of these 2 languages

Python 2 and Python 3

Python 2

  • The older version of Python
  • ITs development has been stalled(updates are done only to fix newly discovered bugs*

Though not normally used in current applications, there are many applications already built in Python 2, so it cannot just be discarded.

Python 3

  • The newer/current version of python

Python 2 and 3 are not compatible with one another, because they are 2 separate languages.

Note that CPython and JPython are extensions of Python 3

  • CPython attempts to solve pythons lack of efficiency (the course focuses on Cpython)
  • JPython - Python that can communicate with JavaScript