PYHTON BLOGGING

 WELCOME TO CRAZYCODING STUFFS


INTRODUCTION TO PYHTON:

Python, is it scripting language or programming language??

let's have a discussion on this 

Python basically a programming language but,

Python uses an interpreter to translate and run its code. Hence Python is a scripting language

Then, what does interpreter will do??

Python Interpreter is a  Virtual machine.

"An interpreter is a program which  converts a high-level programming language (like Python, PHP, Perl) into machine code."

high level language means: human readable form

machine means: binary form


Scripting language :scripting languages do not need an additional step of compilation and rather they are interpreted.

Ex: java script, python, Perl

Programming language: A programming language is a type of written language that tells computers what to do.

 Ex: Python, Ruby, Java, JavaScript, C, C++, and C#


here ,we go comparison chart.


compiler means what??

compiler meanscompiler is a software program that follows the syntax rule of programming language to convert a source code to machine code. It cannot fix any error if present in a program; it generates an error message, and you have to correct it yourself in the program's syntax. If your written program is correct (contains no error), then the compiler will convert your entire source code into machine code. A compiler converts complete source code into machine code at once. And finally, your program get executes.





The entire compilation steps of source code are operated into two phases: Analysis Phase and Synthesis Phase.


  • Analysis Phase: This compiler phase is also known as the front end phase in which a source code is divided into fundamental parts to check grammar, syntax, and semantic of code; after that, the intermediate code is generated. The analysis phase of the compilation process includes a lexical analyzer, semantic analyzer, and syntax analyzer.
  • Synthesis Phase: The Synthesis phase is also known as the back end phase in which the intermediate code (which was generated in Analysis Phase) is optimized and generated into target machine code. The synthesis phase of the compilation process includes code optimizer and code generator tasks   
         

                                HOW THE INTERPRETER WORKS??

An interpreter is also a software program that translates a source code into a machine language. However, an interpreter converts high-level programming language into machine language line-by-line while interpreting and running the program.





COMPARISION BETWEEN INTERPRETER AND COMPILER






Comments

Post a Comment