You are on page 1of 12

Introduction

to

PYTHON
Name : SIDDHISUBHAM SANJAY SAHU
Std : 9th B
Roll no : 29
Agenda

•Overview of python
•Founder of python
•Advantages of python
•Disadvantages of python
•Execution process of programs
Overview of python

Python is an interpreted, interactive, object-oriented programming


language. It incorporates modules, exceptions, dynamic typing, very high
level dynamic data types, and classes. It supports multiple programming
paradigms beyond object-oriented programming, such as procedural and
functional programming. Python combines remarkable power with very
clear syntax. It has interfaces to many system calls and libraries, as
well as to various window systems, and is extensible in C or C++. It is
also usable as an extension language for applications that need a
programmable interface. Finally, Python is portable: it runs on many Unix
variants including Linux and macOS, and on Windows.
Founder of Python

 Python was created by Guido van Rossum, and


first released on February 20, 1991. While you
may know the python as a large snake, the name
of the Python programming language comes
from an old BBC television comedy sketch series
called Monty Python’s Flying Circus.
Advantages of Python

•Clear syntax and readability


•Extensive standard library
•Community support
•Cross-platform compatibility
•Versatility (used in web development,
data science, AI, etc.)
Disadvantages of Python
 Slower execution speed compared to languages like C or Java
 Global Interpreter Lock (GIL) can limit multi-threading performance
 Not ideal for mobile computing or high-graphic 3D games
Overview of the Python execution
process
PVM uses an interpreter which understands the byte code and converts it into machine
code. PVM first understands the processor and operating system in our computer. Then it
converts the byte code into machine code understandable to that processor and into that
format understandable to that operating system. These machine code instructions are then
executed by the processor and results are displayed.
Source code
 Source code is generally understood to mean
programming statements that are created by a
programmer with a text editor or a visual
programming tool and then saved in a file.

 Object code generally refers to the output, a


compiled file, which is produced when the
Source Code is compiled with a C compiler.
Bytecode Generation
Bytecode is an intermediate
language for the Python virtual
machine that's used as a
performance optimization. Instead
of directly executing the human-
readable source code, compact
numeric codes, constants, and references are used that
represent the result of compiler parsing and semantic analysis.
Interpreter Execution
 A python interpreter is a computer program that converts each high-level
program statement into machine code. An interpreter translates the command
that you write out into code that the computer can understand.
 Computer programmers write in high-level programming languages. High-level
languages are written closer to human language and allow programmers to focus
on the command being written. Python is the most famous example of a high-
level language.
 However, while high-level languages are relatively easy to understand by
humans, the same cannot be said for machines. Machines only understand
machine code or machine language, a language represented by strings of bits —
1s and 0s.
 So how do we bridge the gap between what a human programmer writes and
what the machine understands and thus executes? By using an interpreter.
 When using a Python interpreter, the programmer types in the command, the
interpreter reads the command, evaluates it, prints the results, and then goes
back to read the command.
Output in Python

You can display program data to the console in Python with


print() . To display objects to the console, pass them as a
comma-separated list of arguments to print() . As you can
see, even complex types like lists, dictionaries, and
functions can be displayed to the console with print()
Example of PRINT STATEMENTS

You might also like