0% found this document useful (0 votes)
2 views13 pages

Python Programming

Python is a high-level, interpreted programming language created by Guido van Rossum in 1991, known for its readability and simplicity. It supports multiple programming paradigms and is widely used in various fields such as web development, data science, and automation. Python is open-source, has a large standard library, and is favored by major companies like Google and NASA.

Uploaded by

arulnisha212
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)
2 views13 pages

Python Programming

Python is a high-level, interpreted programming language created by Guido van Rossum in 1991, known for its readability and simplicity. It supports multiple programming paradigms and is widely used in various fields such as web development, data science, and automation. Python is open-source, has a large standard library, and is favored by major companies like Google and NASA.

Uploaded by

arulnisha212
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/ 13

N G

I 5
M2 0 2
A M 6
.
R2 5 . 0
G-
O
R ON
PE S S I
NT S
O
H RS
T I

PYO U R
F

Y
WHAT IS PYTHON?
• High-level, interpreted
programming language.
• Created by Guido van Rossum in
1991.
• Emphasizes readability and
simplicity.
• Popular for web development,
data science, automation, AI, etc.
• WHY LEARN PYTHON?
• SIMPLE SYNTAX – EASY FOR BEGINNERS.
• VAST STANDARD LIBRARY AND ACTIVE
COMMUNITY.
• SUPPORTS MULTIPLE PROGRAMMING
PARADIGMS:
• PROCEDURAL
• OBJECT-ORIENTED
• FUNCTIONAL
• USED BY TOP COMPANIES: GOOGLE, NETFLIX,
NASA.
FEATURES OF PYTHON

• OPEN SOURCE AND FREE TO USE.


• INTERPRETED AND DYNAMICALLY TYPED.
• PORTABLE AND EXTENSIBLE.
• LARGE STANDARD LIBRARY.
• INTEGRATES WITH C, C++, JAVA.
• GUI SUPPORT (TKINTER, PYQT).
• EXCELLENT FOR SCRIPTING AND RAPID
DEVELOPMENT.
APPLICATIONS OF PYTHON
• WEB DEVELOPMENT (DJANGO, FLASK)
• DATA SCIENCE AND MACHINE LEARNING
(PANDAS, NUMPY, SCIKIT-LEARN)
• AUTOMATION/SCRIPTING
• GAME DEVELOPMENT
• DESKTOP APPLICATIONS
• IOT AND ROBOTICS
INSTALLING PYTHON
• DOWNLOAD FROM HTTPS://PYTHON.ORG
• INSTALL IDES:
• IDLE (DEFAULT)
• VS CODE
• PYCHARM
• JUPYTER NOTEBOOK
FIRST PYTHON PROGRAM
print("Hello, World!")

print() is a built-in function.


No need for semicolons or main function.
Indentation is mandatory for blocks.
STRUCTURE OF A PYTHON PROGRAM

Documentation/Comments
 Single-line: # This is a comment
 Multi-line: '''This is a multi-line comment'''
Import Statements
 import math
 from datetime import datetime
Function Definitions
 def greet():
Main Program Execution
if __name__ == "__main__":
greet()
BASIC ELEMENTS OF PYTHON

• Variables and Data Types


• Operators
• Control Statements (if, for, while)
• Functions
• Modules
• Classes and Objects
PYTHON SYNTAX HIGHLIGHTS
• Case-sensitive.
• Indentation replaces curly braces.
• No need for variable declarations.
• Dynamic typing (no need to
declare data types).
VARIABLES IN PYTHON
• Variable: A name that refers to a value stored in memory.
• No need to declare the type.
• Variable is created when a value is assigned.
RULES FOR NAMING VARIABLES:

Must begin with a letter or underscore.


Can contain letters, digits, and
underscores.
Case-sensitive (Age and age are
different).
Avoid Python keywords (if, class, True,
etc.).
DATA TYPES IN PYTHON
Python has dynamic typing – no need to declare type explicitly.
Common Data Types:

You might also like