Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Introduction to Problem-Solving

Get introduced to the steps involved in solving a problem.

We'll cover the following

• Key steps in problem-solving


• Understand the problem
• Come up with a practical solution
• Implement the solution
• Example: Finding the square of a number
• Understand the problem
• Come up with a practical solution
• Implement your solution

Problem-solving is the process of understanding a situation or a challenge,


coming up with a practical solution, and implementing the solution. Problem-
solving lies at the heart of programming because the ability to be programmed to
solve complex problems, such as sorting and text to speech conversion, is what
makes computers different from a simple calculator or other machines.

Key steps in problem-solving #


The following steps constitute the problem-solving process:

Come up with
Understand Implement
a practical
the problem the solution
solution

The main steps involved in problem-solving

Understand the problem #


Read the given problem carefully and ponder over the expected output. Carefully
look at the available information.

Come up with a practical solution #


Come up with some specific examples and try to solve them before generalizing
the solution. Think back to see if you have solved a similar problem before and
whether that approach can help you in solving the issue at hand. Develop a precise
sequence of actions to be performed to solve the problem. Use tools like flowcharts
and pseudocode to describe the solution.

Implement the solution #


Execute your solution. Thoroughly test your solution to ensure that it handles all
use-cases and does not break.

Problem-solving is mostly an iterative process, meaning a person goes back to


the initial steps in search of ways to improve the solution.

Example: Finding the square of a number #


Let’s start with a simple example. Suppose that you have to find the square of a
given number n. Here is how you can apply the steps of problem-solving:

Input 3

Find the
Problem Statement square of a
number

Output 9

Determine the square of a given number

Understand the problem #


Carefully read the problem statement, and think about the desired output. The
output should be the square of the given number.

Come up with a practical solution #


Pick some specific numbers. For instance, the square of 3 is 9, and the square of 4
is 16. Observe that the square of a number is the number multiplied by itself.

Implement your solution #


For instance, the square of 5 is 25, and 5 times 5 is 25. Similarly, try multiple tests
to verify the solution.

Input 3

Multiply the
Logic number with
itself

Output 9

Solution to find the square of a given number

Back Next

Quiz on Computer Basics Pseudocode

Mark as Completed

You might also like