SlideShare a Scribd company logo
Copyright © 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
• Python is a simple, easy to learn, powerful, high
level and object-oriented programming language.
• Python is an interpreted scripting language also.
Guido Van Rossum is known as the founder of
python programming.
• Python is a general purpose, dynamic, high level and
interpreted programming language.
• It supports Object Oriented programming approach
to develop applications.
Introduction to Python:
Copyright © 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
…
• It is simple and easy to learn and provides lots of high-
level data structures.
• Python is easy to learn yet powerful and versatile
scripting language which makes it attractive for
Application Development. Python's syntax and dynamic
typing with its interpreted nature, makes it an ideal
language for scripting and rapid application
development.
• Python supports multiple programming pattern,
including object oriented, imperative and functional or
procedural programming styles.
Copyright © 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
• Python is not intended to work on special area such
as web programming. That is why it is known as
multipurpose because it can be used with web,
enterprise, 3D CAD etc.
• We don't need to use data types to declare variable
because it is dynamically typed so we can write
a=10 to assign an integer value in an integer
variable.
• Python makes the development and debugging fast
because there is no compilation step included in
python development and edit-test-debug cycle is
very fast.
Copyright © 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Python Features
• Easy to Learn and Use
• Python is easy to learn and use. It is developer-friendly and high
level programming language.
• Expressive Language
• Python language is more expressive means that it is more
understandable and readable.
• Interpreted Language
• Python is an interpreted language i.e. interpreter executes the code
line by line at a time. This makes debugging easy and thus suitable
for beginners.
• Cross-platform Language
• Python can run equally on different platforms such as Windows,
Linux, Unix and Macintosh etc. So, we can say that Python is a
portable language.
Copyright © 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
• Free and Open Source
• Python language is freely available at official web address. The
source-code is also available. Therefore it is open source.
• Object-Oriented Language
• Python supports object oriented language and concepts of classes
and objects come into existence.
• Extensible
• It implies that other languages such as C/C++ can be used to
compile the code and thus it can be used further in our python code.
• Large Standard Library
• Python has a large and broad library and provides rich set of module
and functions for rapid application development.
• GUI Programming Support
• Graphical user interfaces can be developed using Python.
• Integrated
• It can be easily integrated with languages like C, C++, JAVA etc.
Copyright © 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Python History
• Python laid its foundation in the late 1980s. The implementation of
Python was started in the December 1989 by Guido Van Rossum at
CWI (Centrum Wiskunde & Informatica) in Netherland.
• In February 1991, van Rossum published the code (labeled version
0.9.0) to alternate sources.
• In 1994, Python 1.0 was released with new features like: lambda,
map, filter, and reduce.
• Python 2.0 added new features like: list comprehensions, garbage
collection system.
• On December 3, 2008, Python 3.0 (also called "Py3K") was released.
It was designed to rectify fundamental flaw of the language.
• ABC programming language is said to be the predecessor of Python
language which was capable of Exception Handling and interfacing
with Amoeba Operating
Copyright © 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Python Version
Copyright © 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Python Application Area
• Web Applications
• Desktop GUI Applications
• Software Development
• Scientific and Numeric
• Business Applications
• Console Based Application
• Audio or Video based Applications
• 3D CAD Applications
• Enterprise Applications
• Applications for Images
Copyright © 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Python Keywords
Copyright © 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Input – Processing - Output
Copyright © 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Designing a Program
1. The first step in programming is designing –
flowcharts and pseudocode help with this
process.
2. Next, the code is written.
3. All code must be cleared of all syntax errors.
4. After the executable is created, it can be
checked for logic errors.
5. If logic errors exist, the program must be
debugged.
Copyright © 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
…
The purpose of Programming Logic and
Design is to focus on Flowcharts and
Pseudocode.
The design is the foundation of a good
program.
Figure 2-1 The program development cycle
Copyright © 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Two steps in designing a program
1. Understand the tasks that the program is to
perform.
• Learning what the customer wants.
2. Determine the steps that must be taken to
perform the task.
• Create an algorithm, or step-by-step directions to
solve the problem.
• Use flowcharts and/or pseudocode to solve.
Copyright © 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Pseudocode:
• Fake code used as a model for programs
• No syntax rules
• Well written pseudocode can be easily translated
to actual code
Display Hello World
Print(“Hello World!”)
Copyright © 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Flowcharts
• A diagram that graphically
depicts the steps that take
place in a program
Terminator used for
start and stop
Parallelogram used
for input and output
Rectangle used for
processes
Figure 2.2 Flowchart for the
pay calculating program
Copyright © 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Output, Input, and Variables
Output – data that is generated and displayed
Input – data that a program receives
Variables – storage locations in memory for data
Computer programs typically follow 3 steps
1. Input is received
2. Some process is performed on the input
3. Output is produced
Copyright © 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Variable Naming Convention
Programmers can define variable names following
certain rules
– Must be one word, no spaces
– Generally, punctuation characters are avoided
– Generally, the first character cannot be a number
– Name a variable something that indicates what may
be stored in it camel Case is popular naming
convention.
Copyright © 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Variable Assignment & Calculations
Calculations are performed using math operators
The expression is normally stored in variables
Set sale = price – discount
Table 2-1 Common math operators
Copyright © 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Variable Declarations & Data Types
A variable declaration includes a variable’s name
and a variable’s data type
Data Type – defines the type of data you intend to
store in a variable
– Integer – stores only whole numbers
– Real – stores whole or decimal numbers
– String – any series of characters
Copyright © 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1-20
Documenting a Program
External documentation describes aspects of the
program for the user, sometimes written by a
technical writer
Internal documentation explains how parts of the
program works for the programmer, also
known as comments
// comments are often distinguished within
// the program with line comments
Copyright © 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Designing Your First Program
Calculate the batting average for any player
Batting Average = Hits ÷ Times at Bat
Determine what is required for each phase of the
program:
1.What must be read as input?
2.What will be done with the input?
3.What will be the output?
Copyright © 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Designing Your First Program
1. Input is received.
– The number of hits
– The number of times at bat
2. Some process is performed on the input.
– Calculate the batting average
– Divide the number of hits by the number of times at
bat
3. Output is produced.
– The player’s batting average
Copyright © 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Designing Your First Program
Figure 2-17 Flowchart for program 2-15
Copyright © 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Designing Your First Program
Summary
– Input
• Determine data needed for input
• Choose variables to store the input
– Process
• Determine calculations to be performed
• Choose variables to store the calculations
– Output
• Determine what output the program will display
• Usually the results of the program’s calculations

More Related Content

What's hot

Python lec 1002_for_biologists
Python lec 1002_for_biologistsPython lec 1002_for_biologists
Python lec 1002_for_biologists
Ramadan Babers, PhD
 
Automatic subtitle generation
Automatic subtitle generationAutomatic subtitle generation
Automatic subtitle generation
tanyasaxena1611
 
Python lec 1001_for_biologists
Python lec 1001_for_biologistsPython lec 1001_for_biologists
Python lec 1001_for_biologists
Ramadan Babers, PhD
 
Handson Python
Handson PythonHandson Python
Handson Python
AkramWaseem
 
IRJET- Python: Simple though an Important Programming Language
IRJET- Python: Simple though an Important Programming LanguageIRJET- Python: Simple though an Important Programming Language
IRJET- Python: Simple though an Important Programming Language
IRJET Journal
 
Python Training in Pune - Ethans Tech Pune
Python Training in Pune - Ethans Tech PunePython Training in Pune - Ethans Tech Pune
Python Training in Pune - Ethans Tech Pune
Ethan's Tech
 
About Python Programming Language | Benefit of Python
About Python Programming Language | Benefit of PythonAbout Python Programming Language | Benefit of Python
About Python Programming Language | Benefit of Python
Information Technology
 
Introduction to Python
Introduction to PythonIntroduction to Python
Introduction to Python
DrMohammed Qassim
 
Paper on Speech Recognition
Paper on Speech RecognitionPaper on Speech Recognition
Paper on Speech Recognition
Thejus Joby
 
5 Simple Steps To Install Python On Windows | Install Python 3.7 | Python Tra...
5 Simple Steps To Install Python On Windows | Install Python 3.7 | Python Tra...5 Simple Steps To Install Python On Windows | Install Python 3.7 | Python Tra...
5 Simple Steps To Install Python On Windows | Install Python 3.7 | Python Tra...
Edureka!
 
Learn Python Programming | Python Programming - Step by Step | Python for Beg...
Learn Python Programming | Python Programming - Step by Step | Python for Beg...Learn Python Programming | Python Programming - Step by Step | Python for Beg...
Learn Python Programming | Python Programming - Step by Step | Python for Beg...
Edureka!
 
Python for Big Data Analytics
Python for Big Data AnalyticsPython for Big Data Analytics
Python for Big Data Analytics
Edureka!
 
Text to-speech & voice recognition
Text to-speech & voice recognitionText to-speech & voice recognition
Text to-speech & voice recognition
Mark Williams
 
Python
PythonPython
Statistics Using Python | Statistics Python Tutorial | Python Certification T...
Statistics Using Python | Statistics Python Tutorial | Python Certification T...Statistics Using Python | Statistics Python Tutorial | Python Certification T...
Statistics Using Python | Statistics Python Tutorial | Python Certification T...
Edureka!
 
Machine learning session 1
Machine learning session 1Machine learning session 1
Machine learning session 1
NirsandhG
 
Presentation on python
Presentation on pythonPresentation on python
Presentation on python
william john
 
Python
PythonPython
Lecture01 - Fundamental Programming with Python Language
Lecture01 - Fundamental Programming with Python LanguageLecture01 - Fundamental Programming with Python Language
Lecture01 - Fundamental Programming with Python Language
National College of Business Administration & Economics ( NCBA&E)
 
Introduction to Python
Introduction to PythonIntroduction to Python
Introduction to Python
MuhammadBakri13
 

What's hot (20)

Python lec 1002_for_biologists
Python lec 1002_for_biologistsPython lec 1002_for_biologists
Python lec 1002_for_biologists
 
Automatic subtitle generation
Automatic subtitle generationAutomatic subtitle generation
Automatic subtitle generation
 
Python lec 1001_for_biologists
Python lec 1001_for_biologistsPython lec 1001_for_biologists
Python lec 1001_for_biologists
 
Handson Python
Handson PythonHandson Python
Handson Python
 
IRJET- Python: Simple though an Important Programming Language
IRJET- Python: Simple though an Important Programming LanguageIRJET- Python: Simple though an Important Programming Language
IRJET- Python: Simple though an Important Programming Language
 
Python Training in Pune - Ethans Tech Pune
Python Training in Pune - Ethans Tech PunePython Training in Pune - Ethans Tech Pune
Python Training in Pune - Ethans Tech Pune
 
About Python Programming Language | Benefit of Python
About Python Programming Language | Benefit of PythonAbout Python Programming Language | Benefit of Python
About Python Programming Language | Benefit of Python
 
Introduction to Python
Introduction to PythonIntroduction to Python
Introduction to Python
 
Paper on Speech Recognition
Paper on Speech RecognitionPaper on Speech Recognition
Paper on Speech Recognition
 
5 Simple Steps To Install Python On Windows | Install Python 3.7 | Python Tra...
5 Simple Steps To Install Python On Windows | Install Python 3.7 | Python Tra...5 Simple Steps To Install Python On Windows | Install Python 3.7 | Python Tra...
5 Simple Steps To Install Python On Windows | Install Python 3.7 | Python Tra...
 
Learn Python Programming | Python Programming - Step by Step | Python for Beg...
Learn Python Programming | Python Programming - Step by Step | Python for Beg...Learn Python Programming | Python Programming - Step by Step | Python for Beg...
Learn Python Programming | Python Programming - Step by Step | Python for Beg...
 
Python for Big Data Analytics
Python for Big Data AnalyticsPython for Big Data Analytics
Python for Big Data Analytics
 
Text to-speech & voice recognition
Text to-speech & voice recognitionText to-speech & voice recognition
Text to-speech & voice recognition
 
Python
PythonPython
Python
 
Statistics Using Python | Statistics Python Tutorial | Python Certification T...
Statistics Using Python | Statistics Python Tutorial | Python Certification T...Statistics Using Python | Statistics Python Tutorial | Python Certification T...
Statistics Using Python | Statistics Python Tutorial | Python Certification T...
 
Machine learning session 1
Machine learning session 1Machine learning session 1
Machine learning session 1
 
Presentation on python
Presentation on pythonPresentation on python
Presentation on python
 
Python
PythonPython
Python
 
Lecture01 - Fundamental Programming with Python Language
Lecture01 - Fundamental Programming with Python LanguageLecture01 - Fundamental Programming with Python Language
Lecture01 - Fundamental Programming with Python Language
 
Introduction to Python
Introduction to PythonIntroduction to Python
Introduction to Python
 

Similar to Input, Processing and Output

Specification Of The Programming Language Of Java
Specification Of The Programming Language Of JavaSpecification Of The Programming Language Of Java
Specification Of The Programming Language Of Java
Kim Moore
 
Introduction to Python
Introduction to Python Introduction to Python
Introduction to Python
Rajani S Togarsi
 
An Introduction To Python - Python, Print()
An Introduction To Python - Python, Print()An Introduction To Python - Python, Print()
An Introduction To Python - Python, Print()
Blue Elephant Consulting
 
A Research Study of Data Collection and Analysis of Semantics of Programming ...
A Research Study of Data Collection and Analysis of Semantics of Programming ...A Research Study of Data Collection and Analysis of Semantics of Programming ...
A Research Study of Data Collection and Analysis of Semantics of Programming ...
IRJET Journal
 
Lecture 1.pptx
Lecture 1.pptxLecture 1.pptx
Lecture 1.pptx
hemantmohite6
 
Training report 1923-b.e-eee-batchno--intern-54 (1).pdf
Training report 1923-b.e-eee-batchno--intern-54 (1).pdfTraining report 1923-b.e-eee-batchno--intern-54 (1).pdf
Training report 1923-b.e-eee-batchno--intern-54 (1).pdf
YadavHarshKr
 
Basic Python Introduction Lecture 1.pptx
Basic Python Introduction Lecture 1.pptxBasic Python Introduction Lecture 1.pptx
Basic Python Introduction Lecture 1.pptx
Aditya Patel
 
High Level Language (HLL)
High Level Language (HLL)High Level Language (HLL)
High Level Language (HLL)
Maliha Jahan
 
Is Python a Programming language or Scripting Language_.pdf
Is Python a Programming language or Scripting Language_.pdfIs Python a Programming language or Scripting Language_.pdf
Is Python a Programming language or Scripting Language_.pdf
Kajal Digital
 
Govind.ppt.pptx
Govind.ppt.pptxGovind.ppt.pptx
Govind.ppt.pptx
ShivKaushik8
 
Is Python a Programming language or Scripting Language.pdf
Is Python a Programming language or Scripting Language.pdfIs Python a Programming language or Scripting Language.pdf
Is Python a Programming language or Scripting Language.pdf
Kajal Digital
 
POWER OF PYTHON PROGRAMMING LANGUAGE
POWER OF PYTHON PROGRAMMING LANGUAGE POWER OF PYTHON PROGRAMMING LANGUAGE
POWER OF PYTHON PROGRAMMING LANGUAGE
teachersduniya.com
 
Why Python in required in Civil Engineering
Why Python in required in Civil EngineeringWhy Python in required in Civil Engineering
Why Python in required in Civil Engineering
Rushikesh Kolhe
 
Python Programming - I. Introduction
Python Programming - I. IntroductionPython Programming - I. Introduction
Python Programming - I. Introduction
Ranel Padon
 
Introduction To Python
Introduction To PythonIntroduction To Python
Introduction To Python
Biswajeet Dasmajumdar
 
Python Intro For Managers
Python Intro For ManagersPython Intro For Managers
Python Intro For Managers
Atul Shridhar
 
Python Programming-1.pptx of python by computer
Python Programming-1.pptx of python by computerPython Programming-1.pptx of python by computer
Python Programming-1.pptx of python by computer
sharanyarashmir5
 
Pyhton-1a-Basics.pdf
Pyhton-1a-Basics.pdfPyhton-1a-Basics.pdf
Pyhton-1a-Basics.pdf
Mattupallipardhu
 
INTRODUCTION-TO-PYTHON
INTRODUCTION-TO-PYTHONINTRODUCTION-TO-PYTHON
INTRODUCTION-TO-PYTHON
RuchiNagar3
 
Annotated Bibliography On Unreliable Software
Annotated Bibliography On Unreliable SoftwareAnnotated Bibliography On Unreliable Software
Annotated Bibliography On Unreliable Software
Mary Brown
 

Similar to Input, Processing and Output (20)

Specification Of The Programming Language Of Java
Specification Of The Programming Language Of JavaSpecification Of The Programming Language Of Java
Specification Of The Programming Language Of Java
 
Introduction to Python
Introduction to Python Introduction to Python
Introduction to Python
 
An Introduction To Python - Python, Print()
An Introduction To Python - Python, Print()An Introduction To Python - Python, Print()
An Introduction To Python - Python, Print()
 
A Research Study of Data Collection and Analysis of Semantics of Programming ...
A Research Study of Data Collection and Analysis of Semantics of Programming ...A Research Study of Data Collection and Analysis of Semantics of Programming ...
A Research Study of Data Collection and Analysis of Semantics of Programming ...
 
Lecture 1.pptx
Lecture 1.pptxLecture 1.pptx
Lecture 1.pptx
 
Training report 1923-b.e-eee-batchno--intern-54 (1).pdf
Training report 1923-b.e-eee-batchno--intern-54 (1).pdfTraining report 1923-b.e-eee-batchno--intern-54 (1).pdf
Training report 1923-b.e-eee-batchno--intern-54 (1).pdf
 
Basic Python Introduction Lecture 1.pptx
Basic Python Introduction Lecture 1.pptxBasic Python Introduction Lecture 1.pptx
Basic Python Introduction Lecture 1.pptx
 
High Level Language (HLL)
High Level Language (HLL)High Level Language (HLL)
High Level Language (HLL)
 
Is Python a Programming language or Scripting Language_.pdf
Is Python a Programming language or Scripting Language_.pdfIs Python a Programming language or Scripting Language_.pdf
Is Python a Programming language or Scripting Language_.pdf
 
Govind.ppt.pptx
Govind.ppt.pptxGovind.ppt.pptx
Govind.ppt.pptx
 
Is Python a Programming language or Scripting Language.pdf
Is Python a Programming language or Scripting Language.pdfIs Python a Programming language or Scripting Language.pdf
Is Python a Programming language or Scripting Language.pdf
 
POWER OF PYTHON PROGRAMMING LANGUAGE
POWER OF PYTHON PROGRAMMING LANGUAGE POWER OF PYTHON PROGRAMMING LANGUAGE
POWER OF PYTHON PROGRAMMING LANGUAGE
 
Why Python in required in Civil Engineering
Why Python in required in Civil EngineeringWhy Python in required in Civil Engineering
Why Python in required in Civil Engineering
 
Python Programming - I. Introduction
Python Programming - I. IntroductionPython Programming - I. Introduction
Python Programming - I. Introduction
 
Introduction To Python
Introduction To PythonIntroduction To Python
Introduction To Python
 
Python Intro For Managers
Python Intro For ManagersPython Intro For Managers
Python Intro For Managers
 
Python Programming-1.pptx of python by computer
Python Programming-1.pptx of python by computerPython Programming-1.pptx of python by computer
Python Programming-1.pptx of python by computer
 
Pyhton-1a-Basics.pdf
Pyhton-1a-Basics.pdfPyhton-1a-Basics.pdf
Pyhton-1a-Basics.pdf
 
INTRODUCTION-TO-PYTHON
INTRODUCTION-TO-PYTHONINTRODUCTION-TO-PYTHON
INTRODUCTION-TO-PYTHON
 
Annotated Bibliography On Unreliable Software
Annotated Bibliography On Unreliable SoftwareAnnotated Bibliography On Unreliable Software
Annotated Bibliography On Unreliable Software
 

More from Munazza-Mah-Jabeen

Virtual Functions
Virtual FunctionsVirtual Functions
Virtual Functions
Munazza-Mah-Jabeen
 
The Standard Template Library
The Standard Template LibraryThe Standard Template Library
The Standard Template Library
Munazza-Mah-Jabeen
 
Object-Oriented Software
Object-Oriented SoftwareObject-Oriented Software
Object-Oriented Software
Munazza-Mah-Jabeen
 
Templates and Exceptions
 Templates and Exceptions Templates and Exceptions
Templates and Exceptions
Munazza-Mah-Jabeen
 
Dictionaries and Sets
Dictionaries and SetsDictionaries and Sets
Dictionaries and Sets
Munazza-Mah-Jabeen
 
More About Strings
More About StringsMore About Strings
More About Strings
Munazza-Mah-Jabeen
 
Streams and Files
Streams and FilesStreams and Files
Streams and Files
Munazza-Mah-Jabeen
 
Lists and Tuples
Lists and TuplesLists and Tuples
Lists and Tuples
Munazza-Mah-Jabeen
 
Files and Exceptions
Files and ExceptionsFiles and Exceptions
Files and Exceptions
Munazza-Mah-Jabeen
 
Functions
FunctionsFunctions
Pointers
PointersPointers
Repitition Structure
Repitition StructureRepitition Structure
Repitition Structure
Munazza-Mah-Jabeen
 
Inheritance
InheritanceInheritance
Inheritance
Munazza-Mah-Jabeen
 
Operator Overloading
Operator OverloadingOperator Overloading
Operator Overloading
Munazza-Mah-Jabeen
 
Memory Management
Memory ManagementMemory Management
Memory Management
Munazza-Mah-Jabeen
 
Arrays and Strings
Arrays and StringsArrays and Strings
Arrays and Strings
Munazza-Mah-Jabeen
 
Objects and Classes
Objects and ClassesObjects and Classes
Objects and Classes
Munazza-Mah-Jabeen
 
Functions
FunctionsFunctions
Structures
StructuresStructures
Structures
Munazza-Mah-Jabeen
 
Loops and Decisions
Loops and DecisionsLoops and Decisions
Loops and Decisions
Munazza-Mah-Jabeen
 

More from Munazza-Mah-Jabeen (20)

Virtual Functions
Virtual FunctionsVirtual Functions
Virtual Functions
 
The Standard Template Library
The Standard Template LibraryThe Standard Template Library
The Standard Template Library
 
Object-Oriented Software
Object-Oriented SoftwareObject-Oriented Software
Object-Oriented Software
 
Templates and Exceptions
 Templates and Exceptions Templates and Exceptions
Templates and Exceptions
 
Dictionaries and Sets
Dictionaries and SetsDictionaries and Sets
Dictionaries and Sets
 
More About Strings
More About StringsMore About Strings
More About Strings
 
Streams and Files
Streams and FilesStreams and Files
Streams and Files
 
Lists and Tuples
Lists and TuplesLists and Tuples
Lists and Tuples
 
Files and Exceptions
Files and ExceptionsFiles and Exceptions
Files and Exceptions
 
Functions
FunctionsFunctions
Functions
 
Pointers
PointersPointers
Pointers
 
Repitition Structure
Repitition StructureRepitition Structure
Repitition Structure
 
Inheritance
InheritanceInheritance
Inheritance
 
Operator Overloading
Operator OverloadingOperator Overloading
Operator Overloading
 
Memory Management
Memory ManagementMemory Management
Memory Management
 
Arrays and Strings
Arrays and StringsArrays and Strings
Arrays and Strings
 
Objects and Classes
Objects and ClassesObjects and Classes
Objects and Classes
 
Functions
FunctionsFunctions
Functions
 
Structures
StructuresStructures
Structures
 
Loops and Decisions
Loops and DecisionsLoops and Decisions
Loops and Decisions
 

Recently uploaded

spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skillsspot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
haiqairshad
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
Israel Genealogy Research Association
 
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
Nguyen Thanh Tu Collection
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
adhitya5119
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
Priyankaranawat4
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
Dr. Mulla Adam Ali
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
Jean Carlos Nunes Paixão
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
Dr. Shivangi Singh Parihar
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Excellence Foundation for South Sudan
 
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptxNEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
iammrhaywood
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
eBook.com.bd (প্রয়োজনীয় বাংলা বই)
 
How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17
Celine George
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
History of Stoke Newington
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
mulvey2
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
heathfieldcps1
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
amberjdewit93
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
PECB
 
Cognitive Development Adolescence Psychology
Cognitive Development Adolescence PsychologyCognitive Development Adolescence Psychology
Cognitive Development Adolescence Psychology
paigestewart1632
 
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
สมใจ จันสุกสี
 
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
imrankhan141184
 

Recently uploaded (20)

spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skillsspot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
 
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
 
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptxNEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
 
How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
 
Cognitive Development Adolescence Psychology
Cognitive Development Adolescence PsychologyCognitive Development Adolescence Psychology
Cognitive Development Adolescence Psychology
 
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
 
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
 

Input, Processing and Output

  • 1. Copyright © 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley • Python is a simple, easy to learn, powerful, high level and object-oriented programming language. • Python is an interpreted scripting language also. Guido Van Rossum is known as the founder of python programming. • Python is a general purpose, dynamic, high level and interpreted programming language. • It supports Object Oriented programming approach to develop applications. Introduction to Python:
  • 2. Copyright © 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley … • It is simple and easy to learn and provides lots of high- level data structures. • Python is easy to learn yet powerful and versatile scripting language which makes it attractive for Application Development. Python's syntax and dynamic typing with its interpreted nature, makes it an ideal language for scripting and rapid application development. • Python supports multiple programming pattern, including object oriented, imperative and functional or procedural programming styles.
  • 3. Copyright © 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley • Python is not intended to work on special area such as web programming. That is why it is known as multipurpose because it can be used with web, enterprise, 3D CAD etc. • We don't need to use data types to declare variable because it is dynamically typed so we can write a=10 to assign an integer value in an integer variable. • Python makes the development and debugging fast because there is no compilation step included in python development and edit-test-debug cycle is very fast.
  • 4. Copyright © 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Python Features • Easy to Learn and Use • Python is easy to learn and use. It is developer-friendly and high level programming language. • Expressive Language • Python language is more expressive means that it is more understandable and readable. • Interpreted Language • Python is an interpreted language i.e. interpreter executes the code line by line at a time. This makes debugging easy and thus suitable for beginners. • Cross-platform Language • Python can run equally on different platforms such as Windows, Linux, Unix and Macintosh etc. So, we can say that Python is a portable language.
  • 5. Copyright © 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley • Free and Open Source • Python language is freely available at official web address. The source-code is also available. Therefore it is open source. • Object-Oriented Language • Python supports object oriented language and concepts of classes and objects come into existence. • Extensible • It implies that other languages such as C/C++ can be used to compile the code and thus it can be used further in our python code. • Large Standard Library • Python has a large and broad library and provides rich set of module and functions for rapid application development. • GUI Programming Support • Graphical user interfaces can be developed using Python. • Integrated • It can be easily integrated with languages like C, C++, JAVA etc.
  • 6. Copyright © 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Python History • Python laid its foundation in the late 1980s. The implementation of Python was started in the December 1989 by Guido Van Rossum at CWI (Centrum Wiskunde & Informatica) in Netherland. • In February 1991, van Rossum published the code (labeled version 0.9.0) to alternate sources. • In 1994, Python 1.0 was released with new features like: lambda, map, filter, and reduce. • Python 2.0 added new features like: list comprehensions, garbage collection system. • On December 3, 2008, Python 3.0 (also called "Py3K") was released. It was designed to rectify fundamental flaw of the language. • ABC programming language is said to be the predecessor of Python language which was capable of Exception Handling and interfacing with Amoeba Operating
  • 7. Copyright © 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Python Version
  • 8. Copyright © 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Python Application Area • Web Applications • Desktop GUI Applications • Software Development • Scientific and Numeric • Business Applications • Console Based Application • Audio or Video based Applications • 3D CAD Applications • Enterprise Applications • Applications for Images
  • 9. Copyright © 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Python Keywords
  • 10. Copyright © 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Input – Processing - Output
  • 11. Copyright © 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Designing a Program 1. The first step in programming is designing – flowcharts and pseudocode help with this process. 2. Next, the code is written. 3. All code must be cleared of all syntax errors. 4. After the executable is created, it can be checked for logic errors. 5. If logic errors exist, the program must be debugged.
  • 12. Copyright © 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley … The purpose of Programming Logic and Design is to focus on Flowcharts and Pseudocode. The design is the foundation of a good program. Figure 2-1 The program development cycle
  • 13. Copyright © 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Two steps in designing a program 1. Understand the tasks that the program is to perform. • Learning what the customer wants. 2. Determine the steps that must be taken to perform the task. • Create an algorithm, or step-by-step directions to solve the problem. • Use flowcharts and/or pseudocode to solve.
  • 14. Copyright © 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Pseudocode: • Fake code used as a model for programs • No syntax rules • Well written pseudocode can be easily translated to actual code Display Hello World Print(“Hello World!”)
  • 15. Copyright © 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Flowcharts • A diagram that graphically depicts the steps that take place in a program Terminator used for start and stop Parallelogram used for input and output Rectangle used for processes Figure 2.2 Flowchart for the pay calculating program
  • 16. Copyright © 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Output, Input, and Variables Output – data that is generated and displayed Input – data that a program receives Variables – storage locations in memory for data Computer programs typically follow 3 steps 1. Input is received 2. Some process is performed on the input 3. Output is produced
  • 17. Copyright © 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Variable Naming Convention Programmers can define variable names following certain rules – Must be one word, no spaces – Generally, punctuation characters are avoided – Generally, the first character cannot be a number – Name a variable something that indicates what may be stored in it camel Case is popular naming convention.
  • 18. Copyright © 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Variable Assignment & Calculations Calculations are performed using math operators The expression is normally stored in variables Set sale = price – discount Table 2-1 Common math operators
  • 19. Copyright © 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Variable Declarations & Data Types A variable declaration includes a variable’s name and a variable’s data type Data Type – defines the type of data you intend to store in a variable – Integer – stores only whole numbers – Real – stores whole or decimal numbers – String – any series of characters
  • 20. Copyright © 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1-20 Documenting a Program External documentation describes aspects of the program for the user, sometimes written by a technical writer Internal documentation explains how parts of the program works for the programmer, also known as comments // comments are often distinguished within // the program with line comments
  • 21. Copyright © 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Designing Your First Program Calculate the batting average for any player Batting Average = Hits ÷ Times at Bat Determine what is required for each phase of the program: 1.What must be read as input? 2.What will be done with the input? 3.What will be the output?
  • 22. Copyright © 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Designing Your First Program 1. Input is received. – The number of hits – The number of times at bat 2. Some process is performed on the input. – Calculate the batting average – Divide the number of hits by the number of times at bat 3. Output is produced. – The player’s batting average
  • 23. Copyright © 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Designing Your First Program Figure 2-17 Flowchart for program 2-15
  • 24. Copyright © 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Designing Your First Program Summary – Input • Determine data needed for input • Choose variables to store the input – Process • Determine calculations to be performed • Choose variables to store the calculations – Output • Determine what output the program will display • Usually the results of the program’s calculations