Sunteți pe pagina 1din 10

Python

Scratch
TUTS
Reasons for learning python
• 1-Popularity & High Salary:
Python engineers have some of the highest salaries in the industry. The
average Python Developer salary in the United States is approximately
$116,028 per year. (with Junior Positions)
Also, Python has a strong spike in popularity over the last 1year. Refer the
below screenshot taken from Google Trends.
2-Simplicity

3-Portable & Extensible:


Easy To Connect with other languages (Cross-Languages Concept )

4-Huge Multi-purposes lang.


Encryption & Security
Community Game design
Free & open Computer graphic
source Android apps
Plenty of frameworks
5-Web 6. Artificial
Developmen Intelligence
t

7. Big Data 8-Machine


Learning
& Automation
Precious Sources for python
• As The “ Huge Community “ Advantage ..
Python world introduced a well site for
learning
https://www.learnpython.org/
https://www.codecademy.com/
https://www.w3schools.com/
https://www.edx.org/
https://www.freecodecamp.org/
Compiler VS. Interpreter
A compiler is a program that reads a program written in the high-level
language and converts it into the machine or low-level language and
reports the errors present in the program.(From Python 2 Assembly)
An interpreter is a computer program that is used to directly execute program instructions
written using one of the many high-level programming languages. The interpreter
transforms the high-level program into an intermediate language that it then executes, or it
could parse the high-level source code and then performs the commands directly, which is
done line by line or statement by statement.

Note : Python mainly based on


interpreter method so it make it
faster than any lang. depends on
compiling.
How our codes get executed
?!
1-Lexical Analyzer: It scans the code as a stream of characters, groups the
sequence of characters into lexemes and outputs a sequence of tokens with
reference to the programming language.
2-Syntax Analyzer: In this phase, the tokens that are generated in the
previous stage are checked against the grammar of programming language,
whether the expressions are syntactically correct or not. It makes parse trees
for doing so.
3-Semantic Analyzer: It verifies whether the expressions and statements
generated in the previous phase follow the rule of programming language or
not and it creates annotated parse trees.
4-Intermediate code generator: It generates equivalent intermediate code of
the source code. There are many representations of intermediate code, but
TAC (Three Address Code) is the used most widely.
5-Code Optimizer: It improves time and space requirement of the program.
For doing so, it eliminates the redundant code present in the program.
6-Code generator: This is the final phase of the compiler in which target code
for a particular machine is generated. It performs operations like memory
management, Register assignment, and machine specific optimization.
Python 2 Vs. Python 3

S-ar putea să vă placă și