Using Computer as a
Problem-Solving Tool
Assistant Professor
Computer Engineering and Application
GLA University
Problem-solving
• Understanding and describing the problem correctly is the first
step towards problem-solving.
• Then, utilising our past understanding of the problem domain
and the most effective method for resolving that specific
problem, we attempt to transform the problem into a solution.
Programming
• Programming is an activity to solve a problem using computer.
• A program comprises a set of instruction provided to the
computer to solve a particular problem.
• When we utilise a computer to solve a problem, it will solve the
problem much more quickly.
• The steps below are involved when using a computer as a
problem-solving tool.
◦ Defining & Analysing the problem
◦ Writing Codes
◦ Compilation and Execution
◦ Debugging and Testing
◦ Documentation
Defining & Analysing the problem
• A well-defined problem statement is the first step towards
solving a problem with the computer. Therefore, we need to
define the problem well before we can use a computer program
to solve it. So, a computational problem may consist of many
layers along with the solution to each layer.
Next, we need to analyse the problem. For the analysis, it is vital
to explore the following regarding the problem:
◦ What will be the input?
◦ What kind of output is needed.
◦ Any specific conditions.
◦ Finally, the process that will convert the input to the
desired output.
Example
For example, if the problem is to add two integers, input will be
two positive integers; the process will add both, and the output
will be the sum of both the integers.
Writing Codes
The codes, also referred to as the source code, are written in a
specific programming language. Before writing the code, one
must use the tools such as an algorithm, flowchart, etc., to depict
the program's logic.
Compilation and Execution
The compilation process converts the source code written using
a programming language to machine-readable or executable
format. This process is also called compilation. The .exe file
provided by the compiler runs and produces the output.
Debugging and Testing
• The source code written using a programming language may
have errors which will not allow the source code to compile.
These errors can be a syntax error or logical error.
• These errors, referred to as bugs, needs to be corrected, and
this process of correction is debugging. Debugging involves
checking the program to see if the desired output is obtained or
not.
• Testing, then, is the act of verifying a program's right
functionality by running it with some input data and looking at
the results.
Documentation
Documentation of all the task from the beginning of the problem
solving to its end is essential for future reference.
Documentation can be subcategorised into two parts:
◦Technical Document
◦The Manual
Technical Document
A technical document covers everything from problem analysis to
the implementation details of the program. Any changes or
updates to the program in future will need this document as a
reference.
User Manual
A user manual is a document created for the end user of a
program and it guides the user through the operations of the
program.
Books and References
Sprankle, M. and Hubbard, J., 2012. Problem solving &
programming concepts. Boston: Prentice Hall.
https://ncert.nic.in/textbook/pdf/kecs104.pdf