SlideShare a Scribd company logo
Chapter 1
Overview of Programming
and Problem Solving
What is Programming?
• LOGICALLY SEQUENTIAL thought
• Order of things and actions
Computer Programming
The process of planning a
sequence of steps for a
computer to follow.
Computer Program
A sequence of instructions to be
performed by a computer.
Computer Program
Processing
Function
inputs outputs
Computer Programming
• Computer is a powerful tool
• It is not intelligent!
• In order to use computer to solve our problems,
we must tell it what we want done and the order
in which we want it done.
• These instructions are called computer program.
• This process is called computer programming.
• The person giving these instructions is called a
computer programmer.
Computer Programming
• Analyze the problem
• Develop a sequence of instructions for
solving the problem.
• Communicate it to the computer.
Computer Programs
Once written, computer can repeat
the solution very quickly and
CONSISTENTLY.
Programming Language
A set of rules, symbols, and special
words used to construct a
computer program.
Phases of the software life cycle
• Requirement Definition
• Analysis and design
• Coding
• Testing
• Implementation
• Maintenance
Two Phase Process
• Problem solving
– Analysis and specification
– General solution (algorithm)
– Verification
• Implementation
– Concrete solution (program)
– Test
Problem Solving Techniques
• Ask questions
• Look for things that are similar
• Means-ends analysis
• Divide and Conquer
• Merging solutions
Ask Questions
• Ask questions until you have developed a clear
understanding of the problem.
• Who, What, Why, Where, When.
– What do I have to work with? (my data or input)
– How much data is there?
– What should my output look like?
– How many times is the process going to be
repeated?
– What are the exceptions to the main course?
– What special error condition might come up?
Look for things that are familiar
• Do not reinvent the wheel!
• Draw Analogies
Means-Ends analysis
• Starting point and ending state are known.
• You need to devise the transformation
function.
• Ends are defined – you need to analyze
your means of getting between them.
• Lahore to Islamabad
– What are the options?
– Narrow down the options?
– Figure out the details?
Divide and Conquer
• Same as the Alkhwarzimi Principle.
• Breakup the large problem into smaller
units and then solve them one at a time.
• Building block approach.
Divide and Conquer
Hard Problem
Hard Sub-problemEasy Sub-problem Easy Sub-problem
Easy Sub-problemEasy Sub-problem
Divide
and
Conquer
Merging Solution
• Sometimes merging two independent
solutions solves the problem more
efficiently?
• Calculate Average
– Count values
– Sum Values
– Divide sum by count
• Alternative approach
– calculate partial sum as you count
Problem Solving Techniques
• What is the unknown?
– What is required?
– What do you want?
– What are you supposed to seek?
• What are the data?
– What is given?
– What have you?
• What is the condition?
– By what condition the unknown is linked to the
data?
A Puzzle
A man, starting from point P, walked one mile due
South. Then he changed direction and walked
one mile due East. Then he turned to the left and
walked one mile due North, and arrived at exactly
at the point P he started from. During his journey,
he saw a bear. What is the color of the bear?
What is the unknown?
How could we find the color of the bear from the mathematical
data?
Where is the link?
Conversion from Fahrenheit to Celsius
• Output
– Temperature in Celsius (C)
• Inputs
– Temperature in Fahrenheit (F)
• Process
32)(F
9
5
C −=
Algorithm
Make a Jam and Butter Sandwich
• Output
– Jam and Butter Sandwiches
• Inputs
– Jam, Butter, Bread, Knife, Plate
• Process
1. Put two slices of bread on the plate
2. Using the knife, spread butter on one side
3. Using the knife, spread jam on the other
side
4. Put the two slices together, clean side out
5. Repeat from step 1 to 4 to prepare more
sandwiches
Calculate and print the average grade of
3 tests for the entire class
• Input
– 3 test scores for each student
• output
– Average of 3 tests for each student
• Process
1. Get three scores
2. Add them together
3. Divide by three to get the average
4. Print the average
5. Repeat step 1 to 4 for next student
6. Stop if there are no more students
Algorithm
ATM for withdrawal
• Output
– Money, error messages
• Inputs
– User Identification (ATM card), password,
amount
ATM for withdrawal - Process
1. Get the ATM card for identification and ask for
password
2. Check password
3. If password is not valid, generate an error
message and go to step number 8.
4. Get the amount from the user
5. Check the current balance
6. If amount is greater than current balance,
generate an error message and go to step
number 8.
7. Subtract the amount from the balance and give
out the cash.
8. Return the ATM card
9. Stop
Flow Charting
Expresses the flow of processing in a
structured pictorial format.
Processing
Steps
Input and
Output Steps
Decision
Flow
of
data
Connectors
Terminator
Flow chart for
Converting
Fahrenheit
into Celsius
Get temp. in ‘F’
Print ‘C’
Calculate )32(F
9
5
C −=
Stop
Get bread, butter,
jam, knife, and plate
Put two slices of
bread on the plate
Spread butter on one slice
Spread Jam on the other slice
Put the two slices together,
sticky side in
Want another?
Yes
Stop
No
Flow chart for
preparing a
butter and jam
sandwich
Add them together
Divide the result by three
More students?
Yes
Stop
No
Flow chart for
calculating
average of
three scores
Get three scores
Print the average
Get Password
Is Password
Correct?
Get amount
Yes
Is amount <
Balance
No
Generate
Error Message
No
Generate
Error Message
Subtract amount
from balance
Yes
Stop
Return
ATM card
ATM cash withdrawal process
Dispense cash

More Related Content

What's hot (20)

Programming aids- Algorithm, Flowchart, Pseudocodes and Decision table
Programming aids- Algorithm, Flowchart, Pseudocodes and Decision tableProgramming aids- Algorithm, Flowchart, Pseudocodes and Decision table
Programming aids- Algorithm, Flowchart, Pseudocodes and Decision table
Anjali Technosoft
 
Introduction to Computer Architecture
Introduction to Computer ArchitectureIntroduction to Computer Architecture
Introduction to Computer Architecture
Ankush Srivastava
 
Arithmetic Logic Unit (ALU)
Arithmetic Logic Unit (ALU)Arithmetic Logic Unit (ALU)
Arithmetic Logic Unit (ALU)
Student
 
Introduction to computer architecture and organization
Introduction to computer architecture and organizationIntroduction to computer architecture and organization
Introduction to computer architecture and organization
Muhammad Ishaq
 
Introduction to problem solving in C
Introduction to problem solving in CIntroduction to problem solving in C
Introduction to problem solving in C
Diwakar Pratap Singh 'Deva'
 
Lecture 2 role of algorithms in computing
Lecture 2   role of algorithms in computingLecture 2   role of algorithms in computing
Lecture 2 role of algorithms in computing
jayavignesh86
 
Fulll Adder
Fulll AdderFulll Adder
Fulll Adder
Muhammad Yasir
 
Non- Recursive Predictive Parsing.pptx
Non- Recursive Predictive Parsing.pptxNon- Recursive Predictive Parsing.pptx
Non- Recursive Predictive Parsing.pptx
sampathkumar912515
 
Computer hardware and simulation lab manual
Computer  hardware and simulation lab manualComputer  hardware and simulation lab manual
Computer hardware and simulation lab manual
Vivek Kumar Sinha
 
Analysis and Design of Algorithms
Analysis and Design of AlgorithmsAnalysis and Design of Algorithms
Analysis and Design of Algorithms
Bulbul Agrawal
 
Integrated Development Environments (IDE)
Integrated Development Environments (IDE) Integrated Development Environments (IDE)
Integrated Development Environments (IDE)
SeanPereira2
 
Computer arithmetic
Computer arithmeticComputer arithmetic
Computer arithmetic
Balakrishna Chowdary
 
Divide and conquer
Divide and conquerDivide and conquer
Divide and conquer
Dr Shashikant Athawale
 
Logic gates ppt
Logic gates pptLogic gates ppt
Logic gates ppt
parassini
 
Algorithm analysis (All in one)
Algorithm analysis (All in one)Algorithm analysis (All in one)
Algorithm analysis (All in one)
jehan1987
 
memory hierarchy
memory hierarchymemory hierarchy
memory hierarchy
sreelakshmikv
 
Basic_Computer_Skills, A_seminar_by_Mohan_Kumar_G_Lecturer
Basic_Computer_Skills, A_seminar_by_Mohan_Kumar_G_LecturerBasic_Computer_Skills, A_seminar_by_Mohan_Kumar_G_Lecturer
Basic_Computer_Skills, A_seminar_by_Mohan_Kumar_G_Lecturer
Mohan Kumar G
 
Arithmetic & Logic Unit
Arithmetic & Logic UnitArithmetic & Logic Unit
Arithmetic & Logic Unit
ramya marichamy
 
Computer hardware troubleshooting
Computer hardware troubleshootingComputer hardware troubleshooting
Computer hardware troubleshooting
thehackerconcept .
 
Computer Organization and Architecture.pptx
Computer Organization and Architecture.pptxComputer Organization and Architecture.pptx
Computer Organization and Architecture.pptx
AshokRachapalli1
 
Programming aids- Algorithm, Flowchart, Pseudocodes and Decision table
Programming aids- Algorithm, Flowchart, Pseudocodes and Decision tableProgramming aids- Algorithm, Flowchart, Pseudocodes and Decision table
Programming aids- Algorithm, Flowchart, Pseudocodes and Decision table
Anjali Technosoft
 
Introduction to Computer Architecture
Introduction to Computer ArchitectureIntroduction to Computer Architecture
Introduction to Computer Architecture
Ankush Srivastava
 
Arithmetic Logic Unit (ALU)
Arithmetic Logic Unit (ALU)Arithmetic Logic Unit (ALU)
Arithmetic Logic Unit (ALU)
Student
 
Introduction to computer architecture and organization
Introduction to computer architecture and organizationIntroduction to computer architecture and organization
Introduction to computer architecture and organization
Muhammad Ishaq
 
Lecture 2 role of algorithms in computing
Lecture 2   role of algorithms in computingLecture 2   role of algorithms in computing
Lecture 2 role of algorithms in computing
jayavignesh86
 
Non- Recursive Predictive Parsing.pptx
Non- Recursive Predictive Parsing.pptxNon- Recursive Predictive Parsing.pptx
Non- Recursive Predictive Parsing.pptx
sampathkumar912515
 
Computer hardware and simulation lab manual
Computer  hardware and simulation lab manualComputer  hardware and simulation lab manual
Computer hardware and simulation lab manual
Vivek Kumar Sinha
 
Analysis and Design of Algorithms
Analysis and Design of AlgorithmsAnalysis and Design of Algorithms
Analysis and Design of Algorithms
Bulbul Agrawal
 
Integrated Development Environments (IDE)
Integrated Development Environments (IDE) Integrated Development Environments (IDE)
Integrated Development Environments (IDE)
SeanPereira2
 
Logic gates ppt
Logic gates pptLogic gates ppt
Logic gates ppt
parassini
 
Algorithm analysis (All in one)
Algorithm analysis (All in one)Algorithm analysis (All in one)
Algorithm analysis (All in one)
jehan1987
 
Basic_Computer_Skills, A_seminar_by_Mohan_Kumar_G_Lecturer
Basic_Computer_Skills, A_seminar_by_Mohan_Kumar_G_LecturerBasic_Computer_Skills, A_seminar_by_Mohan_Kumar_G_Lecturer
Basic_Computer_Skills, A_seminar_by_Mohan_Kumar_G_Lecturer
Mohan Kumar G
 
Computer hardware troubleshooting
Computer hardware troubleshootingComputer hardware troubleshooting
Computer hardware troubleshooting
thehackerconcept .
 
Computer Organization and Architecture.pptx
Computer Organization and Architecture.pptxComputer Organization and Architecture.pptx
Computer Organization and Architecture.pptx
AshokRachapalli1
 

Viewers also liked (10)

Atm flowchart
Atm flowchartAtm flowchart
Atm flowchart
nakomuri
 
PROBLEM SOLVING POWERPOINT
PROBLEM SOLVING POWERPOINT PROBLEM SOLVING POWERPOINT
PROBLEM SOLVING POWERPOINT
Andrew Schwartz
 
COIS 102 - Chapter 1
COIS 102 - Chapter 1COIS 102 - Chapter 1
COIS 102 - Chapter 1
cois102.ut
 
flowchart pembukaan rekening baru
flowchart pembukaan rekening baruflowchart pembukaan rekening baru
flowchart pembukaan rekening baru
nurul lina musadad
 
Heuristc Search Techniques
Heuristc Search TechniquesHeuristc Search Techniques
Heuristc Search Techniques
Jismy .K.Jose
 
2.2 Demonstrate the understanding of Programming Life Cycle
2.2 Demonstrate the understanding of Programming Life Cycle2.2 Demonstrate the understanding of Programming Life Cycle
2.2 Demonstrate the understanding of Programming Life Cycle
Frankie Jones
 
2.1 Understand problem solving concept
2.1 Understand problem solving concept2.1 Understand problem solving concept
2.1 Understand problem solving concept
Frankie Jones
 
Atm.ppt
Atm.pptAtm.ppt
Atm.ppt
siva edara
 
What is artificial intelligence
What is artificial intelligenceWhat is artificial intelligence
What is artificial intelligence
Shreya Chakraborty
 
Problem solving ppt
Problem solving pptProblem solving ppt
Problem solving ppt
Ika Rose
 
Atm flowchart
Atm flowchartAtm flowchart
Atm flowchart
nakomuri
 
PROBLEM SOLVING POWERPOINT
PROBLEM SOLVING POWERPOINT PROBLEM SOLVING POWERPOINT
PROBLEM SOLVING POWERPOINT
Andrew Schwartz
 
COIS 102 - Chapter 1
COIS 102 - Chapter 1COIS 102 - Chapter 1
COIS 102 - Chapter 1
cois102.ut
 
flowchart pembukaan rekening baru
flowchart pembukaan rekening baruflowchart pembukaan rekening baru
flowchart pembukaan rekening baru
nurul lina musadad
 
Heuristc Search Techniques
Heuristc Search TechniquesHeuristc Search Techniques
Heuristc Search Techniques
Jismy .K.Jose
 
2.2 Demonstrate the understanding of Programming Life Cycle
2.2 Demonstrate the understanding of Programming Life Cycle2.2 Demonstrate the understanding of Programming Life Cycle
2.2 Demonstrate the understanding of Programming Life Cycle
Frankie Jones
 
2.1 Understand problem solving concept
2.1 Understand problem solving concept2.1 Understand problem solving concept
2.1 Understand problem solving concept
Frankie Jones
 
What is artificial intelligence
What is artificial intelligenceWhat is artificial intelligence
What is artificial intelligence
Shreya Chakraborty
 
Problem solving ppt
Problem solving pptProblem solving ppt
Problem solving ppt
Ika Rose
 
Ad

Similar to Chapter #1 overview of programming and problem solving (20)

Itc lec5-24+sep+2012
Itc lec5-24+sep+2012Itc lec5-24+sep+2012
Itc lec5-24+sep+2012
Rehan Qadri
 
1. Problem Solving Techniques and Data Structures.pptx
1. Problem Solving Techniques and Data Structures.pptx1. Problem Solving Techniques and Data Structures.pptx
1. Problem Solving Techniques and Data Structures.pptx
Ganesh Bhosale
 
CC-112-Lec.1.ppsx
CC-112-Lec.1.ppsxCC-112-Lec.1.ppsx
CC-112-Lec.1.ppsx
Aamir Shahzad
 
Data Structures_Introduction to algorithms.pptx
Data Structures_Introduction to algorithms.pptxData Structures_Introduction to algorithms.pptx
Data Structures_Introduction to algorithms.pptx
RushaliDeshmukh2
 
Problem solving methodology
Problem solving methodologyProblem solving methodology
Problem solving methodology
Prof. Dr. K. Adisesha
 
PPS_Unit 1.pptx
PPS_Unit 1.pptxPPS_Unit 1.pptx
PPS_Unit 1.pptx
KundanBhatkar
 
Csc 130 class 2 problem analysis and flow charts(2)
Csc 130 class 2   problem analysis and flow charts(2)Csc 130 class 2   problem analysis and flow charts(2)
Csc 130 class 2 problem analysis and flow charts(2)
Puneet narula
 
Algorithm and flowchart with pseudo code
Algorithm and flowchart with pseudo codeAlgorithm and flowchart with pseudo code
Algorithm and flowchart with pseudo code
hamza javed
 
Introduction to Programming
Introduction to ProgrammingIntroduction to Programming
Introduction to Programming
Prof Ansari
 
UNIT-1.pptx python for engineering first year students
UNIT-1.pptx python for engineering first year studentsUNIT-1.pptx python for engineering first year students
UNIT-1.pptx python for engineering first year students
SabarigiriVason
 
Unit 2 CPR.pptxaccSSzzCSDVVSVZVZSVVSDVDDSDDS
Unit 2 CPR.pptxaccSSzzCSDVVSVZVZSVVSDVDDSDDSUnit 2 CPR.pptxaccSSzzCSDVVSVZVZSVVSDVDDSDDS
Unit 2 CPR.pptxaccSSzzCSDVVSVZVZSVVSDVDDSDDS
jbadgujar730
 
Fundamental of Information Technology - UNIT 6
Fundamental of Information Technology - UNIT 6Fundamental of Information Technology - UNIT 6
Fundamental of Information Technology - UNIT 6
Shipra Swati
 
Algorithmic thinking with python Module 1.2
Algorithmic thinking with python Module 1.2Algorithmic thinking with python Module 1.2
Algorithmic thinking with python Module 1.2
AbhijithMWarrier1
 
Std 10 computer chapter 9 Problems and Problem Solving
Std 10 computer chapter 9 Problems and Problem SolvingStd 10 computer chapter 9 Problems and Problem Solving
Std 10 computer chapter 9 Problems and Problem Solving
Nuzhat Memon
 
Algo.ppt
Algo.pptAlgo.ppt
Algo.ppt
AyeshaAshiq7
 
Algorithms and flow chart
Algorithms and flow chartAlgorithms and flow chart
Algorithms and flow chart
Rochinisathkorala
 
Algorithm and flowchart
Algorithm and flowchartAlgorithm and flowchart
Algorithm and flowchart
dipti reya
 
CSE-113 UNIT-1 with the basic knowledge of the computer science.pptx
CSE-113 UNIT-1 with the basic knowledge of the computer science.pptxCSE-113 UNIT-1 with the basic knowledge of the computer science.pptx
CSE-113 UNIT-1 with the basic knowledge of the computer science.pptx
ghardik4002
 
s-INTRODUCTION TO PROBLEM SOLVING PPT.pptx
s-INTRODUCTION TO PROBLEM SOLVING PPT.pptxs-INTRODUCTION TO PROBLEM SOLVING PPT.pptx
s-INTRODUCTION TO PROBLEM SOLVING PPT.pptx
ShamithRai
 
Cse115 lecture03problemsolving
Cse115 lecture03problemsolvingCse115 lecture03problemsolving
Cse115 lecture03problemsolving
Md. Ashikur Rahman
 
Itc lec5-24+sep+2012
Itc lec5-24+sep+2012Itc lec5-24+sep+2012
Itc lec5-24+sep+2012
Rehan Qadri
 
1. Problem Solving Techniques and Data Structures.pptx
1. Problem Solving Techniques and Data Structures.pptx1. Problem Solving Techniques and Data Structures.pptx
1. Problem Solving Techniques and Data Structures.pptx
Ganesh Bhosale
 
Data Structures_Introduction to algorithms.pptx
Data Structures_Introduction to algorithms.pptxData Structures_Introduction to algorithms.pptx
Data Structures_Introduction to algorithms.pptx
RushaliDeshmukh2
 
Csc 130 class 2 problem analysis and flow charts(2)
Csc 130 class 2   problem analysis and flow charts(2)Csc 130 class 2   problem analysis and flow charts(2)
Csc 130 class 2 problem analysis and flow charts(2)
Puneet narula
 
Algorithm and flowchart with pseudo code
Algorithm and flowchart with pseudo codeAlgorithm and flowchart with pseudo code
Algorithm and flowchart with pseudo code
hamza javed
 
Introduction to Programming
Introduction to ProgrammingIntroduction to Programming
Introduction to Programming
Prof Ansari
 
UNIT-1.pptx python for engineering first year students
UNIT-1.pptx python for engineering first year studentsUNIT-1.pptx python for engineering first year students
UNIT-1.pptx python for engineering first year students
SabarigiriVason
 
Unit 2 CPR.pptxaccSSzzCSDVVSVZVZSVVSDVDDSDDS
Unit 2 CPR.pptxaccSSzzCSDVVSVZVZSVVSDVDDSDDSUnit 2 CPR.pptxaccSSzzCSDVVSVZVZSVVSDVDDSDDS
Unit 2 CPR.pptxaccSSzzCSDVVSVZVZSVVSDVDDSDDS
jbadgujar730
 
Fundamental of Information Technology - UNIT 6
Fundamental of Information Technology - UNIT 6Fundamental of Information Technology - UNIT 6
Fundamental of Information Technology - UNIT 6
Shipra Swati
 
Algorithmic thinking with python Module 1.2
Algorithmic thinking with python Module 1.2Algorithmic thinking with python Module 1.2
Algorithmic thinking with python Module 1.2
AbhijithMWarrier1
 
Std 10 computer chapter 9 Problems and Problem Solving
Std 10 computer chapter 9 Problems and Problem SolvingStd 10 computer chapter 9 Problems and Problem Solving
Std 10 computer chapter 9 Problems and Problem Solving
Nuzhat Memon
 
Algorithm and flowchart
Algorithm and flowchartAlgorithm and flowchart
Algorithm and flowchart
dipti reya
 
CSE-113 UNIT-1 with the basic knowledge of the computer science.pptx
CSE-113 UNIT-1 with the basic knowledge of the computer science.pptxCSE-113 UNIT-1 with the basic knowledge of the computer science.pptx
CSE-113 UNIT-1 with the basic knowledge of the computer science.pptx
ghardik4002
 
s-INTRODUCTION TO PROBLEM SOLVING PPT.pptx
s-INTRODUCTION TO PROBLEM SOLVING PPT.pptxs-INTRODUCTION TO PROBLEM SOLVING PPT.pptx
s-INTRODUCTION TO PROBLEM SOLVING PPT.pptx
ShamithRai
 
Cse115 lecture03problemsolving
Cse115 lecture03problemsolvingCse115 lecture03problemsolving
Cse115 lecture03problemsolving
Md. Ashikur Rahman
 
Ad

Recently uploaded (20)

Software Engineering Process, Notation & Tools Introduction - Part 3
Software Engineering Process, Notation & Tools Introduction - Part 3Software Engineering Process, Notation & Tools Introduction - Part 3
Software Engineering Process, Notation & Tools Introduction - Part 3
Gaurav Sharma
 
Bonk coin airdrop_ Everything You Need to Know.pdf
Bonk coin airdrop_ Everything You Need to Know.pdfBonk coin airdrop_ Everything You Need to Know.pdf
Bonk coin airdrop_ Everything You Need to Know.pdf
Herond Labs
 
Revolutionize Your Insurance Workflow with Claims Management Software
Revolutionize Your Insurance Workflow with Claims Management SoftwareRevolutionize Your Insurance Workflow with Claims Management Software
Revolutionize Your Insurance Workflow with Claims Management Software
Insurance Tech Services
 
How Insurance Policy Administration Streamlines Policy Lifecycle for Agile Op...
How Insurance Policy Administration Streamlines Policy Lifecycle for Agile Op...How Insurance Policy Administration Streamlines Policy Lifecycle for Agile Op...
How Insurance Policy Administration Streamlines Policy Lifecycle for Agile Op...
Insurance Tech Services
 
Automating Map Production With FME and Python
Automating Map Production With FME and PythonAutomating Map Production With FME and Python
Automating Map Production With FME and Python
Safe Software
 
Providing Better Biodiversity Through Better Data
Providing Better Biodiversity Through Better DataProviding Better Biodiversity Through Better Data
Providing Better Biodiversity Through Better Data
Safe Software
 
Build Smarter, Deliver Faster with Choreo - An AI Native Internal Developer P...
Build Smarter, Deliver Faster with Choreo - An AI Native Internal Developer P...Build Smarter, Deliver Faster with Choreo - An AI Native Internal Developer P...
Build Smarter, Deliver Faster with Choreo - An AI Native Internal Developer P...
WSO2
 
wAIred_RabobankIgniteSession_12062025.pptx
wAIred_RabobankIgniteSession_12062025.pptxwAIred_RabobankIgniteSession_12062025.pptx
wAIred_RabobankIgniteSession_12062025.pptx
SimonedeGijt
 
OpenTelemetry 101 Cloud Native Barcelona
OpenTelemetry 101 Cloud Native BarcelonaOpenTelemetry 101 Cloud Native Barcelona
OpenTelemetry 101 Cloud Native Barcelona
Imma Valls Bernaus
 
Meet You in the Middle: 1000x Performance for Parquet Queries on PB-Scale Dat...
Meet You in the Middle: 1000x Performance for Parquet Queries on PB-Scale Dat...Meet You in the Middle: 1000x Performance for Parquet Queries on PB-Scale Dat...
Meet You in the Middle: 1000x Performance for Parquet Queries on PB-Scale Dat...
Alluxio, Inc.
 
Top 5 Task Management Software to Boost Productivity in 2025
Top 5 Task Management Software to Boost Productivity in 2025Top 5 Task Management Software to Boost Productivity in 2025
Top 5 Task Management Software to Boost Productivity in 2025
Orangescrum
 
Agentic Techniques in Retrieval-Augmented Generation with Azure AI Search
Agentic Techniques in Retrieval-Augmented Generation with Azure AI SearchAgentic Techniques in Retrieval-Augmented Generation with Azure AI Search
Agentic Techniques in Retrieval-Augmented Generation with Azure AI Search
Maxim Salnikov
 
GDG Douglas - Google AI Agents: Your Next Intern?
GDG Douglas - Google AI Agents: Your Next Intern?GDG Douglas - Google AI Agents: Your Next Intern?
GDG Douglas - Google AI Agents: Your Next Intern?
felipeceotto
 
From Chaos to Clarity - Designing (AI-Ready) APIs with APIOps Cycles
From Chaos to Clarity - Designing (AI-Ready) APIs with APIOps CyclesFrom Chaos to Clarity - Designing (AI-Ready) APIs with APIOps Cycles
From Chaos to Clarity - Designing (AI-Ready) APIs with APIOps Cycles
Marjukka Niinioja
 
IMAGE CLASSIFICATION USING CONVOLUTIONAL NEURAL NETWORK.P.pptx
IMAGE CLASSIFICATION USING CONVOLUTIONAL NEURAL NETWORK.P.pptxIMAGE CLASSIFICATION USING CONVOLUTIONAL NEURAL NETWORK.P.pptx
IMAGE CLASSIFICATION USING CONVOLUTIONAL NEURAL NETWORK.P.pptx
usmanch7829
 
Maximizing Business Value with AWS Consulting Services.pdf
Maximizing Business Value with AWS Consulting Services.pdfMaximizing Business Value with AWS Consulting Services.pdf
Maximizing Business Value with AWS Consulting Services.pdf
Elena Mia
 
Marketo & Dynamics can be Most Excellent to Each Other – The Sequel
Marketo & Dynamics can be Most Excellent to Each Other – The SequelMarketo & Dynamics can be Most Excellent to Each Other – The Sequel
Marketo & Dynamics can be Most Excellent to Each Other – The Sequel
BradBedford3
 
Code and No-Code Journeys: The Coverage Overlook
Code and No-Code Journeys: The Coverage OverlookCode and No-Code Journeys: The Coverage Overlook
Code and No-Code Journeys: The Coverage Overlook
Applitools
 
The Future of Open Source Reporting Best Alternatives to Jaspersoft.pdf
The Future of Open Source Reporting Best Alternatives to Jaspersoft.pdfThe Future of Open Source Reporting Best Alternatives to Jaspersoft.pdf
The Future of Open Source Reporting Best Alternatives to Jaspersoft.pdf
Varsha Nayak
 
Neuralink Templateeeeeeeeeeeeeeeeeeeeeeeeee
Neuralink TemplateeeeeeeeeeeeeeeeeeeeeeeeeeNeuralink Templateeeeeeeeeeeeeeeeeeeeeeeeee
Neuralink Templateeeeeeeeeeeeeeeeeeeeeeeeee
alexandernoetzold
 
Software Engineering Process, Notation & Tools Introduction - Part 3
Software Engineering Process, Notation & Tools Introduction - Part 3Software Engineering Process, Notation & Tools Introduction - Part 3
Software Engineering Process, Notation & Tools Introduction - Part 3
Gaurav Sharma
 
Bonk coin airdrop_ Everything You Need to Know.pdf
Bonk coin airdrop_ Everything You Need to Know.pdfBonk coin airdrop_ Everything You Need to Know.pdf
Bonk coin airdrop_ Everything You Need to Know.pdf
Herond Labs
 
Revolutionize Your Insurance Workflow with Claims Management Software
Revolutionize Your Insurance Workflow with Claims Management SoftwareRevolutionize Your Insurance Workflow with Claims Management Software
Revolutionize Your Insurance Workflow with Claims Management Software
Insurance Tech Services
 
How Insurance Policy Administration Streamlines Policy Lifecycle for Agile Op...
How Insurance Policy Administration Streamlines Policy Lifecycle for Agile Op...How Insurance Policy Administration Streamlines Policy Lifecycle for Agile Op...
How Insurance Policy Administration Streamlines Policy Lifecycle for Agile Op...
Insurance Tech Services
 
Automating Map Production With FME and Python
Automating Map Production With FME and PythonAutomating Map Production With FME and Python
Automating Map Production With FME and Python
Safe Software
 
Providing Better Biodiversity Through Better Data
Providing Better Biodiversity Through Better DataProviding Better Biodiversity Through Better Data
Providing Better Biodiversity Through Better Data
Safe Software
 
Build Smarter, Deliver Faster with Choreo - An AI Native Internal Developer P...
Build Smarter, Deliver Faster with Choreo - An AI Native Internal Developer P...Build Smarter, Deliver Faster with Choreo - An AI Native Internal Developer P...
Build Smarter, Deliver Faster with Choreo - An AI Native Internal Developer P...
WSO2
 
wAIred_RabobankIgniteSession_12062025.pptx
wAIred_RabobankIgniteSession_12062025.pptxwAIred_RabobankIgniteSession_12062025.pptx
wAIred_RabobankIgniteSession_12062025.pptx
SimonedeGijt
 
OpenTelemetry 101 Cloud Native Barcelona
OpenTelemetry 101 Cloud Native BarcelonaOpenTelemetry 101 Cloud Native Barcelona
OpenTelemetry 101 Cloud Native Barcelona
Imma Valls Bernaus
 
Meet You in the Middle: 1000x Performance for Parquet Queries on PB-Scale Dat...
Meet You in the Middle: 1000x Performance for Parquet Queries on PB-Scale Dat...Meet You in the Middle: 1000x Performance for Parquet Queries on PB-Scale Dat...
Meet You in the Middle: 1000x Performance for Parquet Queries on PB-Scale Dat...
Alluxio, Inc.
 
Top 5 Task Management Software to Boost Productivity in 2025
Top 5 Task Management Software to Boost Productivity in 2025Top 5 Task Management Software to Boost Productivity in 2025
Top 5 Task Management Software to Boost Productivity in 2025
Orangescrum
 
Agentic Techniques in Retrieval-Augmented Generation with Azure AI Search
Agentic Techniques in Retrieval-Augmented Generation with Azure AI SearchAgentic Techniques in Retrieval-Augmented Generation with Azure AI Search
Agentic Techniques in Retrieval-Augmented Generation with Azure AI Search
Maxim Salnikov
 
GDG Douglas - Google AI Agents: Your Next Intern?
GDG Douglas - Google AI Agents: Your Next Intern?GDG Douglas - Google AI Agents: Your Next Intern?
GDG Douglas - Google AI Agents: Your Next Intern?
felipeceotto
 
From Chaos to Clarity - Designing (AI-Ready) APIs with APIOps Cycles
From Chaos to Clarity - Designing (AI-Ready) APIs with APIOps CyclesFrom Chaos to Clarity - Designing (AI-Ready) APIs with APIOps Cycles
From Chaos to Clarity - Designing (AI-Ready) APIs with APIOps Cycles
Marjukka Niinioja
 
IMAGE CLASSIFICATION USING CONVOLUTIONAL NEURAL NETWORK.P.pptx
IMAGE CLASSIFICATION USING CONVOLUTIONAL NEURAL NETWORK.P.pptxIMAGE CLASSIFICATION USING CONVOLUTIONAL NEURAL NETWORK.P.pptx
IMAGE CLASSIFICATION USING CONVOLUTIONAL NEURAL NETWORK.P.pptx
usmanch7829
 
Maximizing Business Value with AWS Consulting Services.pdf
Maximizing Business Value with AWS Consulting Services.pdfMaximizing Business Value with AWS Consulting Services.pdf
Maximizing Business Value with AWS Consulting Services.pdf
Elena Mia
 
Marketo & Dynamics can be Most Excellent to Each Other – The Sequel
Marketo & Dynamics can be Most Excellent to Each Other – The SequelMarketo & Dynamics can be Most Excellent to Each Other – The Sequel
Marketo & Dynamics can be Most Excellent to Each Other – The Sequel
BradBedford3
 
Code and No-Code Journeys: The Coverage Overlook
Code and No-Code Journeys: The Coverage OverlookCode and No-Code Journeys: The Coverage Overlook
Code and No-Code Journeys: The Coverage Overlook
Applitools
 
The Future of Open Source Reporting Best Alternatives to Jaspersoft.pdf
The Future of Open Source Reporting Best Alternatives to Jaspersoft.pdfThe Future of Open Source Reporting Best Alternatives to Jaspersoft.pdf
The Future of Open Source Reporting Best Alternatives to Jaspersoft.pdf
Varsha Nayak
 
Neuralink Templateeeeeeeeeeeeeeeeeeeeeeeeee
Neuralink TemplateeeeeeeeeeeeeeeeeeeeeeeeeeNeuralink Templateeeeeeeeeeeeeeeeeeeeeeeeee
Neuralink Templateeeeeeeeeeeeeeeeeeeeeeeeee
alexandernoetzold
 

Chapter #1 overview of programming and problem solving

  • 1. Chapter 1 Overview of Programming and Problem Solving
  • 2. What is Programming? • LOGICALLY SEQUENTIAL thought • Order of things and actions
  • 3. Computer Programming The process of planning a sequence of steps for a computer to follow.
  • 4. Computer Program A sequence of instructions to be performed by a computer.
  • 6. Computer Programming • Computer is a powerful tool • It is not intelligent! • In order to use computer to solve our problems, we must tell it what we want done and the order in which we want it done. • These instructions are called computer program. • This process is called computer programming. • The person giving these instructions is called a computer programmer.
  • 7. Computer Programming • Analyze the problem • Develop a sequence of instructions for solving the problem. • Communicate it to the computer.
  • 8. Computer Programs Once written, computer can repeat the solution very quickly and CONSISTENTLY.
  • 9. Programming Language A set of rules, symbols, and special words used to construct a computer program.
  • 10. Phases of the software life cycle • Requirement Definition • Analysis and design • Coding • Testing • Implementation • Maintenance
  • 11. Two Phase Process • Problem solving – Analysis and specification – General solution (algorithm) – Verification • Implementation – Concrete solution (program) – Test
  • 12. Problem Solving Techniques • Ask questions • Look for things that are similar • Means-ends analysis • Divide and Conquer • Merging solutions
  • 13. Ask Questions • Ask questions until you have developed a clear understanding of the problem. • Who, What, Why, Where, When. – What do I have to work with? (my data or input) – How much data is there? – What should my output look like? – How many times is the process going to be repeated? – What are the exceptions to the main course? – What special error condition might come up?
  • 14. Look for things that are familiar • Do not reinvent the wheel! • Draw Analogies
  • 15. Means-Ends analysis • Starting point and ending state are known. • You need to devise the transformation function. • Ends are defined – you need to analyze your means of getting between them. • Lahore to Islamabad – What are the options? – Narrow down the options? – Figure out the details?
  • 16. Divide and Conquer • Same as the Alkhwarzimi Principle. • Breakup the large problem into smaller units and then solve them one at a time. • Building block approach.
  • 17. Divide and Conquer Hard Problem Hard Sub-problemEasy Sub-problem Easy Sub-problem Easy Sub-problemEasy Sub-problem
  • 19. Merging Solution • Sometimes merging two independent solutions solves the problem more efficiently? • Calculate Average – Count values – Sum Values – Divide sum by count • Alternative approach – calculate partial sum as you count
  • 20. Problem Solving Techniques • What is the unknown? – What is required? – What do you want? – What are you supposed to seek? • What are the data? – What is given? – What have you? • What is the condition? – By what condition the unknown is linked to the data?
  • 21. A Puzzle A man, starting from point P, walked one mile due South. Then he changed direction and walked one mile due East. Then he turned to the left and walked one mile due North, and arrived at exactly at the point P he started from. During his journey, he saw a bear. What is the color of the bear? What is the unknown? How could we find the color of the bear from the mathematical data? Where is the link?
  • 22. Conversion from Fahrenheit to Celsius • Output – Temperature in Celsius (C) • Inputs – Temperature in Fahrenheit (F) • Process 32)(F 9 5 C −=
  • 23. Algorithm Make a Jam and Butter Sandwich • Output – Jam and Butter Sandwiches • Inputs – Jam, Butter, Bread, Knife, Plate • Process 1. Put two slices of bread on the plate 2. Using the knife, spread butter on one side 3. Using the knife, spread jam on the other side 4. Put the two slices together, clean side out 5. Repeat from step 1 to 4 to prepare more sandwiches
  • 24. Calculate and print the average grade of 3 tests for the entire class • Input – 3 test scores for each student • output – Average of 3 tests for each student • Process 1. Get three scores 2. Add them together 3. Divide by three to get the average 4. Print the average 5. Repeat step 1 to 4 for next student 6. Stop if there are no more students
  • 25. Algorithm ATM for withdrawal • Output – Money, error messages • Inputs – User Identification (ATM card), password, amount
  • 26. ATM for withdrawal - Process 1. Get the ATM card for identification and ask for password 2. Check password 3. If password is not valid, generate an error message and go to step number 8. 4. Get the amount from the user 5. Check the current balance 6. If amount is greater than current balance, generate an error message and go to step number 8. 7. Subtract the amount from the balance and give out the cash. 8. Return the ATM card 9. Stop
  • 27. Flow Charting Expresses the flow of processing in a structured pictorial format. Processing Steps Input and Output Steps Decision Flow of data Connectors Terminator
  • 28. Flow chart for Converting Fahrenheit into Celsius Get temp. in ‘F’ Print ‘C’ Calculate )32(F 9 5 C −= Stop
  • 29. Get bread, butter, jam, knife, and plate Put two slices of bread on the plate Spread butter on one slice Spread Jam on the other slice Put the two slices together, sticky side in Want another? Yes Stop No Flow chart for preparing a butter and jam sandwich
  • 30. Add them together Divide the result by three More students? Yes Stop No Flow chart for calculating average of three scores Get three scores Print the average
  • 31. Get Password Is Password Correct? Get amount Yes Is amount < Balance No Generate Error Message No Generate Error Message Subtract amount from balance Yes Stop Return ATM card ATM cash withdrawal process Dispense cash