SlideShare a Scribd company logo
GOVERNMENT ENGINEERING COLLEGE
BHARATPUR
INDUSTRIAL TRAINING
2020-21
SUBMITTED BY:
MONISHA GOYAL
18EELCS010
SUBMITTED TO:
ANKIT SIR
Programming
 Python is a general purpose programming language that is often applied in
scripting roles.
 Python is also called as Interpreted language
 Python supports multiple programming paradigms including imperative, procedural
, functional and object oriented programming style.
 Python can be used for • System programming • Graphical User Interface
Programming • Internet Scripting • Component Integration • Database
Programming • Gaming, Images, XML , Robot and more .
 Python interpreters are available for installation on many operating systems,
allowing Python code execution on a wide variety of systems. Eg- IDLE
INTRODUCTION
KEYWORDS IN PYTHON
KEYWORDS
CLASS
PRIVATE VARIABLE
STRONGLY PRIVATE VARIABLE
SPECIAL PURPOSE
if, while
Complex, Exception
_aadharnum, _accountnum
__mobilenum, __loginid
__add__, __init__
Higher level programming languages like python provides a predefined
set of keywords using which a program is coded.
Programming
• Numeric Any representation of data which has numeric value.
Python identifies three types:-
1. INTEGER Positive and negative whole numbers. Examples: 1234, -2 etc.
2. FLOAT Real numbers with a floating point representation Examples: -
55.550
3.COMPLEX NUMBERS A number with a real and imaginary component is
represented as a + bj in Python where a and b are floats and
j = √-1. Examples: 4+6j.
DATATYPES IN PYTHON
• BOOLEAN: Any representation of data which has two values
denoted by True and False.
• SEQUENCE: An ordered collection of similar or different data
types. The built-in Sequence data types in python are:
1. STRING: A collection of one or more characters put in single,
double or triple quotes. Examples: ‘Hello’, "Hello",
"'Hello'", """Hello""“.
2. LIST: An ordered collection of one or more data items, not
necessarily of same type, put in square brackets. Examples:
[1,"Ravi",75.50, True].
3. TUPLE: Similar to list but he contents of a tuple cannot be modified – it is
immutable - after the tuple is created. Examples: (1,"Ravi", 75.50, True).
• DICTIONARY An unordered collection of data in key:value pair
form. Collection of such pairs is enclosed in curly brackets.
Example:
{1:"Superman", 2:"Wonder Woman", 3:"Thor", 4: "Hulk", 5:"Black
Widow“}
Programming
PROGRAMMING IN PYTHON
INTERACTIVE MODE:-Invoking the interpreter without passing a
script file as a parameter brings up the following prompt −
type the following text at the Python prompt and press the Enter −
this produces the following result −
Interactive mode is not suitable for automated processes. So we use scripting mode.
SCRIPTING MODE: Instead of executing one statement at a time we write all the
statement in a text file with .py extension. This script is commonly known as a python
program which can be executed through command line or from run menu of IDLE.
Advantages:
• Easily insert update and delete statements.
• Code or functions from a script can be inserted.
• Automate and schedule.
MATH OPERATOR IN PYTHON
>>> print 3 + 12
15
>>> print 12 – 3
9
>>> print 9 + 5 – 15 + 12
11
Operators: add: +
subtract: -
Math Rule: If you want Python to answer in floats, you have to talk to it in floats.
More operators: divide: /
multiply: *
>>> print 3 * 12
36
>>> print 12.0 / 3.0
4.0
STRINGS IN PYTHON
Strings operators:
 Concatenation: + Adds values on either side of the operator
Try concatenating:
: >>> print “Hello” + “ “ + “world!”
Hello world
 Multiplying: * Creates new strings, concatenating multiple copies of the
same string
Try multiplying
>>> print “HAHA” * 250
MODULE IN PYTHON:
 A module allows you to logically organize your Python code. Grouping related code
into a module makes the code easier to understand and use. A module is a Python
object with arbitrarily named attributes that you can bind and reference.
 Simply, a module is a file consisting of Python code. A module can define
functions, classes and variables. A module can also include runnable code.
The Import Statement:
When the interpreter encounters an import statement, it imports the module if the
module is present in the search path.
When the above code is executed, it produces the following result −
OBJECT ORIENTED PROGRAMMING:
 Python is a multi-paradigm programming language. It supports different
programming approaches.
 One of the popular approaches to solve a programming problem is by
creating objects. This is known as Object-Oriented Programming
(OOP).
 An object has two characteristics:
• attributes
• Behavior
Let's take an example:A parrot is can be an object,as it has the
following properties:
• name, age, color as attributes
• singing, dancing as behavior
 The concept of OOP in Python focuses on creating reusable code.
CONNECTING TO SQLITE DATABASE
 MySQLdb is an interface for connecting to a MySQL database server from Python
 After creating a database in mysql, we need to connect it to the python code.we
follow the following steps for connectivity to the database:
STUDENT MANAGEMENT SYSYTEM USING
PYTHON

More Related Content

What's hot (20)

PPTX
Introduction to-python
Aakashdata
 
PPT
Intro to Python
primeteacher32
 
PPT
Python ppt
Mohita Pandey
 
PDF
Introduction to python
Agung Wahyudi
 
PDF
Datatypes in python
eShikshak
 
PPTX
Python - An Introduction
Swarit Wadhe
 
PPTX
Beginning Python Programming
St. Petersburg College
 
PPTX
How to download and install Python - lesson 2
Shohel Rana
 
PDF
Introduction To Python | Edureka
Edureka!
 
PPTX
Introduction to python
AnirudhaGaikwad4
 
PPTX
Vb.net ide
Faisal Aziz
 
PDF
Python final ppt
Ripal Ranpara
 
PPT
Python ppt
Rohit Verma
 
PDF
Introduction to python programming
Srinivas Narasegouda
 
PPTX
Data types in python
RaginiJain21
 
PPTX
Python basics
RANAALIMAJEEDRAJPUT
 
PPTX
Python and its Applications
Abhijeet Singh
 
PPTX
Introduction to python
Ayshwarya Baburam
 
PPTX
Python Tutorial Part 1
Haitham El-Ghareeb
 
PDF
What is Python? | Edureka
Edureka!
 
Introduction to-python
Aakashdata
 
Intro to Python
primeteacher32
 
Python ppt
Mohita Pandey
 
Introduction to python
Agung Wahyudi
 
Datatypes in python
eShikshak
 
Python - An Introduction
Swarit Wadhe
 
Beginning Python Programming
St. Petersburg College
 
How to download and install Python - lesson 2
Shohel Rana
 
Introduction To Python | Edureka
Edureka!
 
Introduction to python
AnirudhaGaikwad4
 
Vb.net ide
Faisal Aziz
 
Python final ppt
Ripal Ranpara
 
Python ppt
Rohit Verma
 
Introduction to python programming
Srinivas Narasegouda
 
Data types in python
RaginiJain21
 
Python basics
RANAALIMAJEEDRAJPUT
 
Python and its Applications
Abhijeet Singh
 
Introduction to python
Ayshwarya Baburam
 
Python Tutorial Part 1
Haitham El-Ghareeb
 
What is Python? | Edureka
Edureka!
 

Similar to Programming (20)

PPTX
BUILDING IoT WITH ARDUINO & RASPBERRY PI
manohar011101110
 
PPTX
IoT Heaps 4
SushrutaMishra1
 
PPTX
2. Getting Started with Python second lesson .pptx
Primary2Primary2
 
PPTX
introduction to python programming concepts
GautamDharamrajChouh
 
PPTX
Introduction to Programming.pptx ok ok ok
846Sarthakpandey
 
PPTX
Introduction to Python for Data Science and Machine Learning
ParrotAI
 
PPTX
python presntation 2.pptx
Arpittripathi45
 
PPTX
2022-23TYBSC(CS)-Python Prog._Chapter-1.pptx
sangeeta borde
 
PPTX
introduction to python
Jincy Nelson
 
PPTX
bhaskars.pptx
Naveen316549
 
PPTX
Chapter7-Introduction to Python.pptx
lemonchoos
 
PPTX
Python-The programming Language
Rohan Gupta
 
PDF
Programming RPi for IoT Applications.pdf
rakeshk213994
 
PPTX
Python unit 2 is added. Has python related programming content
swarna16
 
PPTX
Introduction to Python Programming Language
merlinjohnsy
 
PDF
Python quick guide
Hasan Bisri
 
PPTX
Python chapter presentation details.pptx
linatalole2001
 
PPT
Python - Module 1.ppt
jaba kumar
 
PPT
Unit 2 python
praveena p
 
BUILDING IoT WITH ARDUINO & RASPBERRY PI
manohar011101110
 
IoT Heaps 4
SushrutaMishra1
 
2. Getting Started with Python second lesson .pptx
Primary2Primary2
 
introduction to python programming concepts
GautamDharamrajChouh
 
Introduction to Programming.pptx ok ok ok
846Sarthakpandey
 
Introduction to Python for Data Science and Machine Learning
ParrotAI
 
python presntation 2.pptx
Arpittripathi45
 
2022-23TYBSC(CS)-Python Prog._Chapter-1.pptx
sangeeta borde
 
introduction to python
Jincy Nelson
 
bhaskars.pptx
Naveen316549
 
Chapter7-Introduction to Python.pptx
lemonchoos
 
Python-The programming Language
Rohan Gupta
 
Programming RPi for IoT Applications.pdf
rakeshk213994
 
Python unit 2 is added. Has python related programming content
swarna16
 
Introduction to Python Programming Language
merlinjohnsy
 
Python quick guide
Hasan Bisri
 
Python chapter presentation details.pptx
linatalole2001
 
Python - Module 1.ppt
jaba kumar
 
Unit 2 python
praveena p
 
Ad

Recently uploaded (20)

PDF
MAD Unit - 2 Activity and Fragment Management in Android (Diploma IT)
JappanMavani
 
PDF
monopile foundation seminar topic for civil engineering students
Ahina5
 
PPTX
artificial intelligence applications in Geomatics
NawrasShatnawi1
 
PDF
6th International Conference on Machine Learning Techniques and Data Science ...
ijistjournal
 
PDF
International Journal of Information Technology Convergence and services (IJI...
ijitcsjournal4
 
PPTX
Types of Bearing_Specifications_PPT.pptx
PranjulAgrahariAkash
 
PDF
MAD Unit - 1 Introduction of Android IT Department
JappanMavani
 
PPTX
Introduction to Neural Networks and Perceptron Learning Algorithm.pptx
Kayalvizhi A
 
PPTX
ISO/IEC JTC 1/WG 9 (MAR) Convenor Report
Kurata Takeshi
 
PPTX
The Role of Information Technology in Environmental Protectio....pptx
nallamillisriram
 
DOCX
8th International Conference on Electrical Engineering (ELEN 2025)
elelijjournal653
 
PPTX
MobileComputingMANET2023 MobileComputingMANET2023.pptx
masterfake98765
 
PDF
Zilliz Cloud Demo for performance and scale
Zilliz
 
PPTX
UNIT DAA PPT cover all topics 2021 regulation
archu26
 
PDF
PORTFOLIO Golam Kibria Khan — architect with a passion for thoughtful design...
MasumKhan59
 
PDF
Statistical Data Analysis Using SPSS Software
shrikrishna kesharwani
 
PPTX
Solar Thermal Energy System Seminar.pptx
Gpc Purapuza
 
PDF
Introduction to Productivity and Quality
মোঃ ফুরকান উদ্দিন জুয়েল
 
DOCX
CS-802 (A) BDH Lab manual IPS Academy Indore
thegodhimself05
 
PPTX
Break Statement in Programming with 6 Real Examples
manojpoojary2004
 
MAD Unit - 2 Activity and Fragment Management in Android (Diploma IT)
JappanMavani
 
monopile foundation seminar topic for civil engineering students
Ahina5
 
artificial intelligence applications in Geomatics
NawrasShatnawi1
 
6th International Conference on Machine Learning Techniques and Data Science ...
ijistjournal
 
International Journal of Information Technology Convergence and services (IJI...
ijitcsjournal4
 
Types of Bearing_Specifications_PPT.pptx
PranjulAgrahariAkash
 
MAD Unit - 1 Introduction of Android IT Department
JappanMavani
 
Introduction to Neural Networks and Perceptron Learning Algorithm.pptx
Kayalvizhi A
 
ISO/IEC JTC 1/WG 9 (MAR) Convenor Report
Kurata Takeshi
 
The Role of Information Technology in Environmental Protectio....pptx
nallamillisriram
 
8th International Conference on Electrical Engineering (ELEN 2025)
elelijjournal653
 
MobileComputingMANET2023 MobileComputingMANET2023.pptx
masterfake98765
 
Zilliz Cloud Demo for performance and scale
Zilliz
 
UNIT DAA PPT cover all topics 2021 regulation
archu26
 
PORTFOLIO Golam Kibria Khan — architect with a passion for thoughtful design...
MasumKhan59
 
Statistical Data Analysis Using SPSS Software
shrikrishna kesharwani
 
Solar Thermal Energy System Seminar.pptx
Gpc Purapuza
 
Introduction to Productivity and Quality
মোঃ ফুরকান উদ্দিন জুয়েল
 
CS-802 (A) BDH Lab manual IPS Academy Indore
thegodhimself05
 
Break Statement in Programming with 6 Real Examples
manojpoojary2004
 
Ad

Programming

  • 1. GOVERNMENT ENGINEERING COLLEGE BHARATPUR INDUSTRIAL TRAINING 2020-21 SUBMITTED BY: MONISHA GOYAL 18EELCS010 SUBMITTED TO: ANKIT SIR
  • 3.  Python is a general purpose programming language that is often applied in scripting roles.  Python is also called as Interpreted language  Python supports multiple programming paradigms including imperative, procedural , functional and object oriented programming style.  Python can be used for • System programming • Graphical User Interface Programming • Internet Scripting • Component Integration • Database Programming • Gaming, Images, XML , Robot and more .  Python interpreters are available for installation on many operating systems, allowing Python code execution on a wide variety of systems. Eg- IDLE INTRODUCTION
  • 4. KEYWORDS IN PYTHON KEYWORDS CLASS PRIVATE VARIABLE STRONGLY PRIVATE VARIABLE SPECIAL PURPOSE if, while Complex, Exception _aadharnum, _accountnum __mobilenum, __loginid __add__, __init__ Higher level programming languages like python provides a predefined set of keywords using which a program is coded.
  • 6. • Numeric Any representation of data which has numeric value. Python identifies three types:- 1. INTEGER Positive and negative whole numbers. Examples: 1234, -2 etc. 2. FLOAT Real numbers with a floating point representation Examples: - 55.550 3.COMPLEX NUMBERS A number with a real and imaginary component is represented as a + bj in Python where a and b are floats and j = √-1. Examples: 4+6j. DATATYPES IN PYTHON
  • 7. • BOOLEAN: Any representation of data which has two values denoted by True and False. • SEQUENCE: An ordered collection of similar or different data types. The built-in Sequence data types in python are: 1. STRING: A collection of one or more characters put in single, double or triple quotes. Examples: ‘Hello’, "Hello", "'Hello'", """Hello""“. 2. LIST: An ordered collection of one or more data items, not necessarily of same type, put in square brackets. Examples: [1,"Ravi",75.50, True]. 3. TUPLE: Similar to list but he contents of a tuple cannot be modified – it is immutable - after the tuple is created. Examples: (1,"Ravi", 75.50, True).
  • 8. • DICTIONARY An unordered collection of data in key:value pair form. Collection of such pairs is enclosed in curly brackets. Example: {1:"Superman", 2:"Wonder Woman", 3:"Thor", 4: "Hulk", 5:"Black Widow“}
  • 10. PROGRAMMING IN PYTHON INTERACTIVE MODE:-Invoking the interpreter without passing a script file as a parameter brings up the following prompt − type the following text at the Python prompt and press the Enter − this produces the following result − Interactive mode is not suitable for automated processes. So we use scripting mode.
  • 11. SCRIPTING MODE: Instead of executing one statement at a time we write all the statement in a text file with .py extension. This script is commonly known as a python program which can be executed through command line or from run menu of IDLE. Advantages: • Easily insert update and delete statements. • Code or functions from a script can be inserted. • Automate and schedule.
  • 12. MATH OPERATOR IN PYTHON >>> print 3 + 12 15 >>> print 12 – 3 9 >>> print 9 + 5 – 15 + 12 11 Operators: add: + subtract: - Math Rule: If you want Python to answer in floats, you have to talk to it in floats. More operators: divide: / multiply: * >>> print 3 * 12 36 >>> print 12.0 / 3.0 4.0
  • 13. STRINGS IN PYTHON Strings operators:  Concatenation: + Adds values on either side of the operator Try concatenating: : >>> print “Hello” + “ “ + “world!” Hello world  Multiplying: * Creates new strings, concatenating multiple copies of the same string Try multiplying >>> print “HAHA” * 250
  • 14. MODULE IN PYTHON:  A module allows you to logically organize your Python code. Grouping related code into a module makes the code easier to understand and use. A module is a Python object with arbitrarily named attributes that you can bind and reference.  Simply, a module is a file consisting of Python code. A module can define functions, classes and variables. A module can also include runnable code. The Import Statement: When the interpreter encounters an import statement, it imports the module if the module is present in the search path. When the above code is executed, it produces the following result −
  • 15. OBJECT ORIENTED PROGRAMMING:  Python is a multi-paradigm programming language. It supports different programming approaches.  One of the popular approaches to solve a programming problem is by creating objects. This is known as Object-Oriented Programming (OOP).  An object has two characteristics: • attributes • Behavior Let's take an example:A parrot is can be an object,as it has the following properties: • name, age, color as attributes • singing, dancing as behavior  The concept of OOP in Python focuses on creating reusable code.
  • 16. CONNECTING TO SQLITE DATABASE  MySQLdb is an interface for connecting to a MySQL database server from Python  After creating a database in mysql, we need to connect it to the python code.we follow the following steps for connectivity to the database: