Unit 2 - final
Unit 2 - final
an interpreter.
It takes less amount of time to analyze the source code but the
Translates program one statement at a time. Scans the entire program and translates it as a
whole into machine code.
It takes less amount of time to analyze the source It takes large amount of time to analyze the
code but the overall execution time is slower. source code but the overall execution time is
comparatively faster.
No intermediate object code is generated, hence Generates intermediate object code which further
are memory efficient. requires linking, hence requires more memory.
Continues translating the program until the first It generates the error message only after scanning
error is met, in which case it stops. Hence the whole program. Hence debugging is
debugging is easy. comparatively hard.
Programming language like Python, Ruby use Programming language like C, C++ use
interpreters. compilers.
DOWNLOADING & RUNNING PYTHON PROGRAM
from https://www.python.org/ Downloads
Download for Windows. Once selected, it will
start to download. A Python package
including python exe, module docs and
documentation.
There are two ways to run a Python program
– Interactive mode and Script mode
Interactive Mode
+ Addition
- Subtraction
* Multiplication
/ Division
% Modulo Operator
** Exponentiation
// Floor Division