Introduction to problem solving
What is problem Solving :
Problem solving is the process of identifying a problem, developing an algorithm for the identified problem and finally implementing the algorithm to develop a computer program.
Steps of Problem Solving:
- Analysing the program
- Developing an Algorithm
- Coding
- Testing and Debugging
- Analysing the program : By analysing a problem, we would be able to figure out what are the inputs that our program should accept and the outputs that it should produce.
Explanation:
It is important to clearly understand a problem before we begin to find the solution for it. If we are not clear as to what is to be solved, we may end up developing a program which may not solve our purpose. Thus, we need to read and analyse the problem statement carefully in order to list the principal components of the problem and decide the core functionalities that our solution should have.
2) Developing an Algorithm : It is essential to device a solution before writing a program
code for a given problem. The solution is represented in natural language and is called
an algorithm.
Explanation:
A programmer writes a program to instruct the computer to do certain tasks as desired. The computer then follows the steps written in the program code. Therefore, the programmer first prepares a roadmap of the program written, before actually writing the code. Without a roadmap, the programmer may not be able to clearly visualise the instructions to be written and may end up developing a program which may not work as expected. Such a roadmap is nothing but the algorithm which is the building block of a computer program.
3) Coding : After finalising the algorithm, we need to convert the algorithm into the format
which can understand by the computer to generate the desired solution.This is called
coding.
Explanation :
A program written in a high-level language called source code. We need to translate the source code into machine language using a compiler or an interpreter, so that it can understand by the computer.Different high level programming languages can be used for writing a program for Eg; Python , c , c++ etc.
4) Testing and coding : Testing is the process to find bugs and errors. Debugging is the
process to correct the bugs found during testing.
Explanation :
The program created should be tested on various parameters. The program should meet the requirements of the user. It must respond within the expected time. It should generate correct output for all possible inputs. In the presence of syntactical errors, no output will obtain. In case the output generated is incorrect, then the program should check for logical errors, if any.
- Suggested Reading Material
- NCERT Textbook for COMPUTER SCIENCE (Class XI)
- Support Materials on the CBSE website.
You can also download complete PDF from the link below:
For more help you may write us @ ” [email protected] ” and like our Facebook page : Soluversity