SlideShare una empresa de Scribd logo
1 de 39
BY
DR.BELMER GLADSON.V M.E.,Ph.D.,
ASSOCIATE PROFESSOR
ADHI COLLEGE OF ENGINEERING AND TECHNOLOGY
CONTENTS
 INTRODUCTION
 PROBLEM SOLVING TECHNIQUES
 ALGORITHMIC STRATEGIES
 FUNCTIONS
 PYTHON – VARIABLES AND OPERATORS
 CONTROL STRUCTURES
 STRINGS AND STRING MANIPULATION
 LIST,TUPLES AND DICTIONARY
INTRODUCTION
 Python is a general-purpose interpreted, interactive,
object-oriented, and high-level programming
language.
 It was created by Guido van Rossum during 1985- 1990
Why to Learn Python?
 Python is a high-level, interpreted, interactive and
object-oriented scripting language.
 Designed- highly readable.
 Uses English Keywords frequently.
 To become a great Software Engineer – Web
Development Domain.
 Python is Interpreted
 Python is Interactive
 Python is Object-Oriented
 Python is a Beginner's Language
Applications of Python
 Easy-to-learn
 Easy-to-read
 Easy-to-maintain
 Interactive Mode
 Portable
 OpenSource
 Real Time Applications
 Bit Torrent file sharing
 Google search engine, YouTube
 Face book, Drop box
PROBLEM SOLVING TECHNIQUES
 Define the problem and creating number of solutions.
 Starts –Problem specification, Ends – Correct
Program.
PROBLEM SOLVING TECHNIQUES
• Set of techniques that helps in providing logic –solve
the problem.
1. Algorithms.
2. Flowcharts.
3. Pseudo codes.
4. Programs
ALGORITHM
 Sequence of instructions that describe a method.
Qualities of an Algorithm:
 Should be written in simple English
 Should be precise and unambiguous.
 Should not be repeated infinitely.
 should conclude after a finite number of steps.
 Should have an end point
 Derived results should be obtained only after the
algorithm terminates.
Example:
Addition of Two Numbers:
1.Start
2. Read the value of ‘a’
3. Read the value of ‘b’
4. Calculate sum=a+b
5. Print the sum of two number
6. Stop
Flowchart
---Graphical Representation of an Algorithm
Example:
Pseudocode
 Informal high-level description.
 Example:
 To find sum of two numbers
1.READ num1,num2
2.sum=num1+num2
3.PRINT sum
Program
 Program= Algorithm +Data
 Set of instruction, to the computer to solve a problem.
 Accept the data to perform computation.
ALGORITHMIC STRATEGIES
FUNCTIONS
 Block of organized, reusable code that is used to
perform a single, related action.
 Methods, sub-routines.
 Syntax
function_name(parameters)
function statements
end function
Algorithm for addition of two
numbers using function
 Main function()
Step 1: Start
Step 2:Call the function add()
Step 3: Stop
• Sub function add()
Step1:Functionstart
Step2:Geta,bValues
Step 3: add c=a+b
Step 4: Print c
Step 5: Return
VARIABLES:
 Store a value by assigning it to a name.
 It can be of any length. No space is allowed
 Assigning value to variable:
 >>>counter =45
print (counter)
 single value to several variables
a=b=c=100
 Multiple values to multiple variables
>>>a,b,c=2,4,"ram"
OPERATORS
 Constructs which can manipulate the value of operands.
expression 4 + 5 = 9
 Types of Operators
 Arithmetic Operators
 Comparison (Relational)Operators
 Assignment Operators
 Logical Operators
 Bitwise Operators
 Membership Operators
 Identity Operators
Arithmetic operators:
Comparison (Relational)Operators
Assignment Operators
Logical Operators:
Bitwise Operators:
Membership Operators:
CONTROL STRUCTURES
 Conditional Statements
Conditional if
Alternative if… else
Chained if…elif…else
Nested if….else
Conditional if
Alternative if… else
Chained if…elif…else
Example
Nested if….else
Example:
STRINGS AND STRING MANIPULATION
 Series or sequence of characters
 Strings are marked by quotes:
Single quotes(' ') E.g., 'This a string in single quotes'
Double quotes(" ") E.g., "'This a string in double quotes‘”
Triple quotes(""" """)E.g., """This is a paragraph. It is
made up of multiple lines and sentences.""“
 Strings are Immutable
Operations on string
Lists
 List is an ordered sequence of items
 square brackets[]
 Items in the lists can be of different datatypes
 Operations on list: Indexing, Slicing ,Concatenation
Repetitions, Updation, Insertion, Deletion
Operations on list
Tuple:
 A tuple is same as list
 Parentheses()
 A tuple is an immutable list
 Benefit of Tuple:
 Tuples are faster than lists.
 If the user wants to protect the data from accidental changes,
tuple can be used
Basic Operations:
Dictionaries
 Dictionaries are unorderedsets.
 curly brackets{}
 Dictionaries are accessed via keys
Operations:
PROBLEM SOLVING TECHNIQUES USING PYTHON.pptx

Más contenido relacionado

La actualidad más candente

La actualidad más candente (20)

Python Programming Language
Python Programming LanguagePython Programming Language
Python Programming Language
 
Phython Programming Language
Phython Programming LanguagePhython Programming Language
Phython Programming Language
 
Benefits & features of python |Advantages & disadvantages of python
Benefits & features of python |Advantages & disadvantages of pythonBenefits & features of python |Advantages & disadvantages of python
Benefits & features of python |Advantages & disadvantages of python
 
Python 3 Programming Language
Python 3 Programming LanguagePython 3 Programming Language
Python 3 Programming Language
 
Python basics
Python basicsPython basics
Python basics
 
Python programming
Python  programmingPython  programming
Python programming
 
Python: the Project, the Language and the Style
Python: the Project, the Language and the StylePython: the Project, the Language and the Style
Python: the Project, the Language and the Style
 
Introduction To Python | Edureka
Introduction To Python | EdurekaIntroduction To Python | Edureka
Introduction To Python | Edureka
 
Python Programming ppt
Python Programming pptPython Programming ppt
Python Programming ppt
 
Python ppt
Python pptPython ppt
Python ppt
 
Python
PythonPython
Python
 
Python
PythonPython
Python
 
Python - An Introduction
Python - An IntroductionPython - An Introduction
Python - An Introduction
 
Python programming
Python programmingPython programming
Python programming
 
Python basics
Python basicsPython basics
Python basics
 
introduction to Python (for beginners)
introduction to Python (for beginners)introduction to Python (for beginners)
introduction to Python (for beginners)
 
Python basic
Python basicPython basic
Python basic
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
Why Python?
Why Python?Why Python?
Why Python?
 
Introduction to python programming, Why Python?, Applications of Python
Introduction to python programming, Why Python?, Applications of PythonIntroduction to python programming, Why Python?, Applications of Python
Introduction to python programming, Why Python?, Applications of Python
 

Similar a PROBLEM SOLVING TECHNIQUES USING PYTHON.pptx

An Overview Of Python With Functional Programming
An Overview Of Python With Functional ProgrammingAn Overview Of Python With Functional Programming
An Overview Of Python With Functional Programming
Adam Getchell
 
PART - 1 Python Introduction- Variables- Data types - Numeric- String- Boole...
PART - 1  Python Introduction- Variables- Data types - Numeric- String- Boole...PART - 1  Python Introduction- Variables- Data types - Numeric- String- Boole...
PART - 1 Python Introduction- Variables- Data types - Numeric- String- Boole...
manikamr074
 
C#3.0 & Vb 9.0 New Features
C#3.0 & Vb 9.0 New FeaturesC#3.0 & Vb 9.0 New Features
C#3.0 & Vb 9.0 New Features
techfreak
 

Similar a PROBLEM SOLVING TECHNIQUES USING PYTHON.pptx (20)

Python Programming - II. The Basics
Python Programming - II. The BasicsPython Programming - II. The Basics
Python Programming - II. The Basics
 
Python
PythonPython
Python
 
Automation Testing theory notes.pptx
Automation Testing theory notes.pptxAutomation Testing theory notes.pptx
Automation Testing theory notes.pptx
 
Introduction of Python
Introduction of PythonIntroduction of Python
Introduction of Python
 
An Overview Of Python With Functional Programming
An Overview Of Python With Functional ProgrammingAn Overview Of Python With Functional Programming
An Overview Of Python With Functional Programming
 
Lab manual object oriented technology (it 303 rgpv) (usefulsearch.org) (usef...
Lab manual object oriented technology (it 303 rgpv) (usefulsearch.org)  (usef...Lab manual object oriented technology (it 303 rgpv) (usefulsearch.org)  (usef...
Lab manual object oriented technology (it 303 rgpv) (usefulsearch.org) (usef...
 
Python_Haegl.powerpoint presentation. tx
Python_Haegl.powerpoint presentation. txPython_Haegl.powerpoint presentation. tx
Python_Haegl.powerpoint presentation. tx
 
INTERNSHIP REPORT.docx
 INTERNSHIP REPORT.docx INTERNSHIP REPORT.docx
INTERNSHIP REPORT.docx
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
C++ book
C++ bookC++ book
C++ book
 
Welcome to python workshop
Welcome to python workshopWelcome to python workshop
Welcome to python workshop
 
MODULE 1.pptx
MODULE 1.pptxMODULE 1.pptx
MODULE 1.pptx
 
Pyhton-1a-Basics.pdf
Pyhton-1a-Basics.pdfPyhton-1a-Basics.pdf
Pyhton-1a-Basics.pdf
 
First Steps in Python Programming
First Steps in Python ProgrammingFirst Steps in Python Programming
First Steps in Python Programming
 
علم البيانات - Data Sience
علم البيانات - Data Sience علم البيانات - Data Sience
علم البيانات - Data Sience
 
20120314 changa-python-workshop
20120314 changa-python-workshop20120314 changa-python-workshop
20120314 changa-python-workshop
 
Recent Trends in Translation of Programming Languages using NLP Approaches
Recent Trends in Translation of Programming Languages using NLP ApproachesRecent Trends in Translation of Programming Languages using NLP Approaches
Recent Trends in Translation of Programming Languages using NLP Approaches
 
Oops ppt
Oops pptOops ppt
Oops ppt
 
PART - 1 Python Introduction- Variables- Data types - Numeric- String- Boole...
PART - 1  Python Introduction- Variables- Data types - Numeric- String- Boole...PART - 1  Python Introduction- Variables- Data types - Numeric- String- Boole...
PART - 1 Python Introduction- Variables- Data types - Numeric- String- Boole...
 
C#3.0 & Vb 9.0 New Features
C#3.0 & Vb 9.0 New FeaturesC#3.0 & Vb 9.0 New Features
C#3.0 & Vb 9.0 New Features
 

Último

Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoorTop Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
dharasingh5698
 
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
 

Último (20)

Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.ppt
 
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
 
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoorTop Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
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
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
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
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
22-prompt engineering noted slide shown.pdf
22-prompt engineering noted slide shown.pdf22-prompt engineering noted slide shown.pdf
22-prompt engineering noted slide shown.pdf
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
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 ...
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptx
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equation
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdf
 

PROBLEM SOLVING TECHNIQUES USING PYTHON.pptx

  • 1. BY DR.BELMER GLADSON.V M.E.,Ph.D., ASSOCIATE PROFESSOR ADHI COLLEGE OF ENGINEERING AND TECHNOLOGY
  • 2. CONTENTS  INTRODUCTION  PROBLEM SOLVING TECHNIQUES  ALGORITHMIC STRATEGIES  FUNCTIONS  PYTHON – VARIABLES AND OPERATORS  CONTROL STRUCTURES  STRINGS AND STRING MANIPULATION  LIST,TUPLES AND DICTIONARY
  • 3. INTRODUCTION  Python is a general-purpose interpreted, interactive, object-oriented, and high-level programming language.  It was created by Guido van Rossum during 1985- 1990
  • 4. Why to Learn Python?  Python is a high-level, interpreted, interactive and object-oriented scripting language.  Designed- highly readable.  Uses English Keywords frequently.  To become a great Software Engineer – Web Development Domain.  Python is Interpreted  Python is Interactive  Python is Object-Oriented  Python is a Beginner's Language
  • 5. Applications of Python  Easy-to-learn  Easy-to-read  Easy-to-maintain  Interactive Mode  Portable  OpenSource  Real Time Applications  Bit Torrent file sharing  Google search engine, YouTube  Face book, Drop box
  • 6. PROBLEM SOLVING TECHNIQUES  Define the problem and creating number of solutions.  Starts –Problem specification, Ends – Correct Program. PROBLEM SOLVING TECHNIQUES • Set of techniques that helps in providing logic –solve the problem. 1. Algorithms. 2. Flowcharts. 3. Pseudo codes. 4. Programs
  • 7. ALGORITHM  Sequence of instructions that describe a method. Qualities of an Algorithm:  Should be written in simple English  Should be precise and unambiguous.  Should not be repeated infinitely.  should conclude after a finite number of steps.  Should have an end point  Derived results should be obtained only after the algorithm terminates.
  • 8. Example: Addition of Two Numbers: 1.Start 2. Read the value of ‘a’ 3. Read the value of ‘b’ 4. Calculate sum=a+b 5. Print the sum of two number 6. Stop
  • 11. Pseudocode  Informal high-level description.  Example:  To find sum of two numbers 1.READ num1,num2 2.sum=num1+num2 3.PRINT sum
  • 12. Program  Program= Algorithm +Data  Set of instruction, to the computer to solve a problem.  Accept the data to perform computation.
  • 14. FUNCTIONS  Block of organized, reusable code that is used to perform a single, related action.  Methods, sub-routines.  Syntax function_name(parameters) function statements end function
  • 15. Algorithm for addition of two numbers using function  Main function() Step 1: Start Step 2:Call the function add() Step 3: Stop • Sub function add() Step1:Functionstart Step2:Geta,bValues Step 3: add c=a+b Step 4: Print c Step 5: Return
  • 16. VARIABLES:  Store a value by assigning it to a name.  It can be of any length. No space is allowed  Assigning value to variable:  >>>counter =45 print (counter)  single value to several variables a=b=c=100  Multiple values to multiple variables >>>a,b,c=2,4,"ram"
  • 17. OPERATORS  Constructs which can manipulate the value of operands. expression 4 + 5 = 9  Types of Operators  Arithmetic Operators  Comparison (Relational)Operators  Assignment Operators  Logical Operators  Bitwise Operators  Membership Operators  Identity Operators
  • 24. CONTROL STRUCTURES  Conditional Statements Conditional if Alternative if… else Chained if…elif…else Nested if….else
  • 31. STRINGS AND STRING MANIPULATION  Series or sequence of characters  Strings are marked by quotes: Single quotes(' ') E.g., 'This a string in single quotes' Double quotes(" ") E.g., "'This a string in double quotes‘” Triple quotes(""" """)E.g., """This is a paragraph. It is made up of multiple lines and sentences.""“  Strings are Immutable
  • 33. Lists  List is an ordered sequence of items  square brackets[]  Items in the lists can be of different datatypes  Operations on list: Indexing, Slicing ,Concatenation Repetitions, Updation, Insertion, Deletion
  • 35. Tuple:  A tuple is same as list  Parentheses()  A tuple is an immutable list  Benefit of Tuple:  Tuples are faster than lists.  If the user wants to protect the data from accidental changes, tuple can be used
  • 37. Dictionaries  Dictionaries are unorderedsets.  curly brackets{}  Dictionaries are accessed via keys