SlideShare una empresa de Scribd logo
1 de 17
GOVERNMENT ENGINEERING COLLEGE
BHARATPUR
INDUSTRIAL TRAINING
2020-21
SUBMITTED BY:
MONISHA GOYAL
18EELCS010
SUBMITTED TO:
ANKIT SIR
 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.
• 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 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

Más contenido relacionado

La actualidad más candente

La actualidad más candente (20)

Chapter 1 - INTRODUCTION TO PYTHON -MAULIK BORSANIYA
Chapter 1 - INTRODUCTION TO PYTHON -MAULIK BORSANIYAChapter 1 - INTRODUCTION TO PYTHON -MAULIK BORSANIYA
Chapter 1 - INTRODUCTION TO PYTHON -MAULIK BORSANIYA
 
Variables in python
Variables in pythonVariables in python
Variables in python
 
Python presentation by Monu Sharma
Python presentation by Monu SharmaPython presentation by Monu Sharma
Python presentation by Monu Sharma
 
Introduction to the basics of Python programming (part 1)
Introduction to the basics of Python programming (part 1)Introduction to the basics of Python programming (part 1)
Introduction to the basics of Python programming (part 1)
 
Programming with Python
Programming with PythonProgramming with Python
Programming with Python
 
Basics of python
Basics of pythonBasics of python
Basics of python
 
Overview of python 2019
Overview of python 2019Overview of python 2019
Overview of python 2019
 
Basic Concepts in Python
Basic Concepts in PythonBasic Concepts in Python
Basic Concepts in Python
 
Phython Programming Language
Phython Programming LanguagePhython Programming Language
Phython Programming Language
 
Python - the basics
Python - the basicsPython - the basics
Python - the basics
 
Python - An Introduction
Python - An IntroductionPython - An Introduction
Python - An Introduction
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
Python Programming Language
Python Programming LanguagePython Programming Language
Python Programming Language
 
Python Tutorial For Beginners | Python Crash Course - Python Programming Lang...
Python Tutorial For Beginners | Python Crash Course - Python Programming Lang...Python Tutorial For Beginners | Python Crash Course - Python Programming Lang...
Python Tutorial For Beginners | Python Crash Course - Python Programming Lang...
 
Introduction to python programming
Introduction to python programmingIntroduction to python programming
Introduction to python programming
 
Python by Rj
Python by RjPython by Rj
Python by Rj
 
Python
PythonPython
Python
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
Python programming | Fundamentals of Python programming
Python programming | Fundamentals of Python programming Python programming | Fundamentals of Python programming
Python programming | Fundamentals of Python programming
 
Python basic
Python basicPython basic
Python basic
 

Similar a Programming

Tutorial on-python-programming
Tutorial on-python-programmingTutorial on-python-programming
Tutorial on-python-programming
Chetan Giridhar
 

Similar a Programming (20)

Python (3).pdf
Python (3).pdfPython (3).pdf
Python (3).pdf
 
web programming UNIT VIII python by Bhavsingh Maloth
web programming UNIT VIII python by Bhavsingh Malothweb programming UNIT VIII python by Bhavsingh Maloth
web programming UNIT VIII python by Bhavsingh Maloth
 
Python Course In Chandigarh
Python Course In ChandigarhPython Course In Chandigarh
Python Course In Chandigarh
 
Python intro
Python introPython intro
Python intro
 
Python_Introduction_Good_PPT.pptx
Python_Introduction_Good_PPT.pptxPython_Introduction_Good_PPT.pptx
Python_Introduction_Good_PPT.pptx
 
Python Course In Chandigarh
Python Course In ChandigarhPython Course In Chandigarh
Python Course In Chandigarh
 
Report om 3
Report om 3Report om 3
Report om 3
 
Tutorial on-python-programming
Tutorial on-python-programmingTutorial on-python-programming
Tutorial on-python-programming
 
Python programming
Python programmingPython programming
Python programming
 
Python for katana
Python for katanaPython for katana
Python for katana
 
Python programming language introduction unit
Python programming language introduction unitPython programming language introduction unit
Python programming language introduction unit
 
Py-Slides- easuajsjsjejejjwlqpqpqpp1.pdf
Py-Slides- easuajsjsjejejjwlqpqpqpp1.pdfPy-Slides- easuajsjsjejejjwlqpqpqpp1.pdf
Py-Slides- easuajsjsjejejjwlqpqpqpp1.pdf
 
Python PPT.pptx
Python PPT.pptxPython PPT.pptx
Python PPT.pptx
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
INTERNSHIP REPORT.docx
 INTERNSHIP REPORT.docx INTERNSHIP REPORT.docx
INTERNSHIP REPORT.docx
 
Python fundamentals
Python fundamentalsPython fundamentals
Python fundamentals
 
Fundamentals of python
Fundamentals of pythonFundamentals of python
Fundamentals of python
 
pythontraining-201jn026043638.pptx
pythontraining-201jn026043638.pptxpythontraining-201jn026043638.pptx
pythontraining-201jn026043638.pptx
 
Introduction to Python for Security Professionals
Introduction to Python for Security ProfessionalsIntroduction to Python for Security Professionals
Introduction to Python for Security Professionals
 
Introduction to Python Unit -1 Part .pdf
Introduction to Python Unit -1 Part .pdfIntroduction to Python Unit -1 Part .pdf
Introduction to Python Unit -1 Part .pdf
 

Último

Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Kandungan 087776558899
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
amitlee9823
 

Último (20)

Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
 
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
 
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdf
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineering
 
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
 

Programming

  • 1. GOVERNMENT ENGINEERING COLLEGE BHARATPUR INDUSTRIAL TRAINING 2020-21 SUBMITTED BY: MONISHA GOYAL 18EELCS010 SUBMITTED TO: ANKIT SIR
  • 2.
  • 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.
  • 5.
  • 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“}
  • 9.
  • 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: