0% found this document useful (0 votes)
11 views29 pages

PPM-Unit 2-RM

This document discusses the Python programming language. It provides an overview of Python, including its uses in areas like machine learning and web development. It also covers Python concepts like data types, identifiers, comments, and more. Major companies that use Python are listed, along with common careers that use Python skills.

Uploaded by

mdtayyab212121
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views29 pages

PPM-Unit 2-RM

This document discusses the Python programming language. It provides an overview of Python, including its uses in areas like machine learning and web development. It also covers Python concepts like data types, identifiers, comments, and more. Major companies that use Python are listed, along with common careers that use Python skills.

Uploaded by

mdtayyab212121
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 29

CDUA11233

Programming Paradigm Methodology

Unit 2
Decision Control Statements
Python

• It is a general-purpose language, interpreted,


interactive, object-oriented, and high-level
programming language.
• Used in various areas of applications such as Machine
Learning, Artificial Intelligence, Data Science, web
development, IoT, and more.
• It was created by Guido van Rossum during 1985- 1990
List all of the companies using Python,
• Google
• Intel
• NASA
• PayPal
• Facebook
• IBM
• Amazon
• Netflix
• Pinterest
• Uber
Why to Learn Python?

• Python is Open Source which means its available free of


cost.
• Python is simple and so easy to learn
• Python is versatile and can be used to create many
different things.
• Python has powerful development libraries include AI,
ML etc.
• Python is much in demand and ensures high salary
Key advantages of learning Python
• Python is Interpreted − Python is processed at runtime by the
interpreter. You do not need to compile your program
before executing it. This is similar to PERL and PHP.
• Python is Interactive − Interactive environment for developers.
In an interactive programming environment, you can
execute individual lines of code or small code snippets
immediately and receive immediate feedback or results.
• Python is Object-Oriented − Python supports Object-Oriented
style or technique of programming that encapsulates code
within objects.
• Python is a Beginner's Language − supports the development of
a wide range of applications from simple text processing
to WWW browsers to games.
Careers with Python
• Game developer
• Web designer
• Python developer
• Full-stack developer
• Machine learning engineer
• Data scientist
• Data analyst
• Data engineer
• DevOps engineer
• Software engineer
• Many more other roles
Characteristics of Python

• It supports functional and structured programming


methods as well as OOP.
• It can be used as a scripting language for building large
applications.
• It provides very high-level dynamic data types and
supports dynamic type checking.
• It supports automatic garbage collection.
• It can be easily integrated with C, C++ and Java.
Applications of Python
• Easy-to-learn −
• Easy-to-read −
• Easy-to-maintain −
• A broad standard library − Python's bulk of the library is very portable and
cross-platform compatible on UNIX, Windows, and Macintosh.
• Interactive Mode − Allows interactive testing and debugging of snippets of
code.
• Portable − Python can run on a wide variety of hardware platforms and has
the same interface on all platforms.
• Extendable − You can add low-level modules to the Python interpreter. These
modules enable programmers to add to or customize their tools to be more
efficient.
• Databases − Python provides interfaces to all major commercial databases.
• GUI Programming − Python supports GUI applications that can be created and
ported to many system calls, libraries and windows systems, such as
Windows MFC, Macintosh, and the X Window system of Unix.
• Scalable − Python provides a better structure and support for large programs
Python Current Version

More and more features have been incorporated into


Python's 3.x branch. As of date, Python 3.11.2 is the
current stable version, released in February 2023.
Python is Interactive

• Standard Python distribution comes with an interactive


shell that works on the principle of REPL (Read –
Evaluate – Print – Loop). The shell presents a Python
prompt >>>.
Python is Extensible

• The term extensibility implies the ability to add new


features or modify existing features.

• Cpython: written in C.
• JPython (written in Java)
• IPython (written in C#)
Cross platform

• When a C++ source code such as hello.cpp is compiled


on Linux, it can be only run on any other computer with
Linux operating system. If required to run on other OS,
it needs to be compiled.
• Python interpreter doesn't produce compiled code.
Source code is converted to byte code every time
it is run on any operating system without any changes
or additional steps.
Portability

• Python code is easily portable from one OS to other


Static vs Dynamic Typing

• C++ is a statically typed language. The type of


variables for storing data need to be declared in the
beginning. Undeclared variables can't be used. Once a
variable is declared to be of a certain type, value of only
that type can be stored in it.
• Python is a dynamically typed language. It doesn't
require a variable to be declared before assigning it a
value. Since, a variable may store any type of data, it is
called dynamically typed.
Python for Data Science

• Real time web applications, mobile applications and


other devices generate huge amount of data. Python's
data science libraries help companies generate business
insights from this data.
• Libraries like NumPy, Pandas and Matplotlib are
extensively used to apply mathematical algorithms to
the data and generate visualizations. Commercial and
community Python distributions like Anaconda bundle
all the essential libraries required for data science.
Python for Machine Learning

• Python libraries such as Scikit-learn and TensorFlow


help in building models for prediction of trends like
customer satisfaction, projected values of stocks etc.
based upon the past data. Machine learning applications
include (but not restricted to) medical diagnosis,
statistical arbitrage, basket analysis, sales prediction
etc.
Python for Web Development

• Python's web frameworks facilitate rapid web


application development. Django, Pyramid, Flask are
very popular among the web developer community. etc.
make it very easy to develop and deploy simple as well
as complex web applications.
Python for Computer Vision and Image processing

• OpenCV is a widely popular library for capturing and


processing images. Image processing algorithms extract
information from images, reconstruct image and video
data. Computer Vision uses image processing for face
detection and pattern recognition. OpenCV is a C++
library.
• Some of the application areas of computer vision are
robotics, industrial surveillance and automation,
biometrics etc.
Python Identifiers

• A Python identifier is a name used to identify a variable,


function, class, module or other object. An identifier
starts with a letter A to Z or a to z or an underscore (_)
followed by zero or more letters, underscores and digits
(0 to 9).
• Python does not allow punctuation characters such as
@, $, and % within identifiers.
• Python is a case sensitive programming language.
Python Reserved Words

and as assert
break class continue
def del elif
else except False
finally for from
global if import
in is lambda
None nonlocal not
or pass raise
return True try
while with yield
Python Lines and Indentation

• Python programming provides no braces to indicate


blocks of code for class and function definitions or flow
control. Blocks of code are denoted by line
indentation
Quotations in Python
• Python accepts single ('), double (") and triple (''' or """)
quotes to denote string literals, as long as the same type
of quote starts and ends the string.
• The triple quotes are used to span the string across
multiple lines.
Comments in Python
• A comment is a programmer-readable explanation or
annotation in the Python source code. They are added
with the purpose of making the source code easier for
humans to understand, and are ignored by Python
interpreter
• Python supports single-line (or end-of-line) and
multi-line (block) comments.

You might also like