0% found this document useful (0 votes)
12 views3 pages

Problem Solving Steps and Techniques

Chapter 4 introduces problem-solving steps, including analyzing the problem, developing an algorithm, coding, and testing. It defines an algorithm as a precise, unique, and finite procedure that takes input and produces output, and discusses pseudocode and flowcharts as tools for representing algorithms. Additionally, it highlights the concept of decomposition, which involves breaking down complex problems into simpler sub-problems.

Uploaded by

roohi anjum
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views3 pages

Problem Solving Steps and Techniques

Chapter 4 introduces problem-solving steps, including analyzing the problem, developing an algorithm, coding, and testing. It defines an algorithm as a precise, unique, and finite procedure that takes input and produces output, and discusses pseudocode and flowcharts as tools for representing algorithms. Additionally, it highlights the concept of decomposition, which involves breaking down complex problems into simpler sub-problems.

Uploaded by

roohi anjum
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Chapter-4

INTRODUCTION TO PROBLEM SOLVING

Steps for problem solving

Step 1 : Analysing the problem

Step 2: Developing an algorithm

Step 3 : Coding

Step4 : Testing and Debugging

Algorithm

An algorithm is a step-by-step procedure to solve a given problem.

NOTE:
• In order to write effective algorithms, we need to identify the input, the process to be followed and the
desired output.
•A good algorithm, which is precise, unique and finite, receives input and produces an output.
Characteristics of a good algorithm

 Precision — the steps are precisely stated or defined.


 Uniqueness — results of each step are uniquely defined and only depend on the input and the
result of the preceding steps.
 Finiteness — the algorithm always stops after a finite number of steps.
 Input — the algorithm receives some input.
 Output — the algorithm produces some output.

Pseudocode

Pseudocode is an informal way of describing the steps of a solution without using any programming
language.

Pseudocode for calculating area and perimeter of a rectangle.

INPUT length

INPUT breadth

COMPUTE Area = length * breadth


PRINT Area

COMPUTE Perimeter = 2 * (length + breadth)

PRINT Perimeter

Flowchart.

Flowchart is a graphical representation of an algorithm to solve a given problem.

Flowchart Symbols

Flowchart to display the sum of two numbers entered by users.


Flowchart to check whether a number is odd or even.

Flowchart to calculate area and perimeter of a rectangle.

Decomposition.

Breaking down a complex problem into sub problems is known as decomposition

***************************

You might also like