Professional Documents
Culture Documents
INTRODUCTION TO PROBLEM SOLVING
INTRODUCTION TO PROBLEM SOLVING
Analyzing the problem is basically understanding a problem very clearly before finding its
solution. Analyzing a problem involves
Developing an Algorithm
Coding
Algorithm written in natural language is not understood by computer and hence it has to
be converted in machine language. And to do so program based on that algorithm is
written using high level programming language for the computer to get the desired
solution.
Testing and Debugging
After writing program it has to be tested on various parameters to ensure that program is
producing correct output within expected time and meeting the user requirement.
There are many standard software testing methods used in IT industry such as
Component testing
Integration testing
System testing
Acceptance testing
What is Algorithm?
A set of precise, finite and sequential set of steps written to solve a problem and
get the desired output.
Algorithm has definite beginning and definite end.
It lead to desired result in finite amount of time of followed correctly.
Representation of Algorithm
Flow chart
Pseudo code
Flow chart
Algorithm
Step 1: Input a two numbers and store them in num1 and num2
Step 2: Compute num1/num2 and store its quotient in num3
Step 3: Print num3
Flow chart
Pseudo code
INPUT
COMPUTE
PRINT
INCREMENT
DECREMENT
IF/ELSE
WHILE
TRUE/FALSE
Algorithm
Pseudo code
INPUT num
COMPUTE square = num*num
PRINT square
Flow chart
Pseudo code
INPUT L
INPUT B
COMPUTER Area = L * B
PRINT Area
COMPUTE Perimeter = 2 * ﴾ L + B ﴿
PRINT Perimeter
Flow Chart
Flow of Control
An algorithm is considered as finite set of steps that are executed in a sequence. But
sometimes the algorithm may require executing some steps conditionally or repeatedly. In
such situations algorithm can be written using
Sequence
Selection
Repetition
Selection
If <condition> then
Steps to be taken when condition is true
Otherwise
Steps to be taken when condition is false
Algorithm
Pseudo code
Flow Chart
Pseudocode
Flow chart
Repetition
Algorithm
Pseudocode
SET count = 0
WHILE count<10
PRINT “Techtipnow”
Count = count + 1
END WHILE
Flow chart
Flow Chart
Example: Write pseudo code and flow chart to find factorial of a given number
Flow chart
Decomposition
Leave a Comment
Your email address will not be published. Required fields are marked *
Type here..
Name*
Email*
Website
Save my name, email, and website in this browser for the next time I comment.
Post Comment »
Search …
Categories
Artificial Intelligence
Boolean Algebra
Cloud Computing
Computer Fundamentals
Computer Network
CS Class 11
CS Class 11 MCQ
CS Class 12 MCQ
CS Class 12 Tutorial
CSV Files
Cyber Crime
Cyber Safety
DBMS MCQs
Emerging Trends
Internet
Internet MCQ
IOT
IP Class 11 MCQ
IP Class 11 Tutorial
IP Class 12 MCQ
IP Class 12 Tutorial
IP Practicals
IT 402 Class 10
Java Programming
Matplotlib Pyplot
NCERT Solutions
Operating System
Python DataFrame
Python MCQ