Getting Started With Python
Getting Started With Python
specific task
Source code→A program written in a high-level language
Language translators→Tools to convert source code to machine language
Types→Interpreter, compiler
Interpreter
Definition→A language translator that processes statements one-by-one,
translating and then executing.
Error handling→An interpreter processes statements one-by-one until an
error is encountered or the whole program is executed successfully.
Compiler
Definition→A language translator that translates the entire source code as
a whole into object code.
Error handling→After scanning the whole program, a compiler generates error
messages, if any.
Features of Python
Elements→High level, interpreted, easy to understand, case-sensitive, platform
independent, rich library, web dev, indentation
High level→Python is a high level language, and is free and open source.
Interpreted→Python is an interpreted language, because Python programs are
executed by an interpreter.
Easy to understand→Python programs are easy to understand as they have a
clearly defined syntax and relatively simple structure.
Case-sensitive→Python is case-sensitive, e.g., "number" and "NUMBER" are not
the same in Python.
Platform independent→Python is portable and platform independent, means it can
run on various operating systems and hardware platforms.
Rich library→Python has a rich library of predefined functions.
Web dev→Python is helpful in web development. Many popular web apps and
services are built using Python.
Indentation→Python uses indentation for blocks and nested blocks.
Numeric literals
Types→Float, int, complex