this topic covers all the steps involved in problem solving in computer science. It will help you understand that how can we go through different steps to find a good solution to a problem.
2. • Chapter 1 More on Number System
• Chapter 2 Working on Word
• Chapter 3 Working with Spreadsheet
• Chapter 4 Problem solving
• Chapter 5 Introduction to programming
• Chapter 6 Programming in GW-BASIC
• Chapter 7 Data verification & validation
• Chapter 8 Data protection & security
• Chapter 9 Applications of computers
• Chapter 11 The future of Technology
• Chapter 12 Creating webpages
12/2/2020
2
4. Problem solving
• Problem-solving is a process—an ongoing
activity in which we take what we know to
discover what we don't know.
• It involves steps arranged in a manner to solve a
particular problem
5. A step-by-step approach to problem -
solving
• We can solve a problem by thinking about it in a
step by step manner.
• This helps us think clearly and avoid becoming
confused.
6. 1. Defining the problem
• The first step in problem-solving is to define the
problem.
• What the problem is?
• A good problem definition is precise.
• The more precise the problem statement is, the
easier it becomes to find the right solution.
7. 2. The Input
• After problem definition we move towards
finding the solution.
• We collect input carefully from surroundings.
• This is similar to data capturing and data
collection in data processing cycle.
8. 3. The Output
• After input we think what the result of our
solution should be.
• We should ask ourselves the question: What
should change as a result of the solution?
• This is called output requirement.
• When we are able to define the output
requirements, we can reach a good solution to
the problem.
9. 3. The processing requirement
• Once we are clear about our input and output
requirement, we can think about how to use
those inputs to achieve output.
10. 4. The solution
• By thinking carefully about the processing
requirements we can discover the right
solution for the problem.
• When we go in step by step manner we can
easily arrive at a solution.
• Programmers follow this approach when
they create programs.
11. Repetition
• A repetition problem arises when we want a
computer to do a task again and again.
• When we ask a computer to repeat an action
we use the following two statements:
1. The Do…WHILE statement
2. The REPEAT…UNTIL statement
12. 1. The Do…WHILE statement
• It is a conditional statement.
• It uses a condition to instruct the computer.
• The condition might be true or not true.
• The computer repeat an action while the
condition is true.
• The computer stops repeating the action when
the condition becomes not true.
14. Algorithm for Do…WHILE statement
• Start treatment.
• Check body temperature.
• Continue treatment if temperature is greater
than 370C
• Stop treatment if temperature is not greater
than 370C.
• End treatment.
17. The REPEAT… UNTIL statement
• It is also a conditional statement.
• The computer repeat an action until the
condition is not true.
• WHILE loop test the condition before
carrying out the instruction, whereas the
REPEAT loop carries out the instruction
before testing the condition.