# problem solving by winkushan

VIEWS: 7 PAGES: 5

• pg 1
```									Computer Studies                                                                     Notes

With all this technology and abundance of software applications, it is still up to
human beings to invent new ways of using computers.

Much of computer science is devoted to organising your thoughts into ways of getting
defined outcomes to problems quickly and efficiently.

At the most fundamental level you have to write down your solution to a problem in
some particular way; in computing this vital recipe for the solution to a problem is
called an algorithm.

An algorithm is …
• … a step-by-step sequence of instructions …
• … to solve a specific problem …
• in a finite amount of time.
Many different methods exist for constructing algorithms, including flowcharts and
pseudo-code.

Here is an example of the very last part of an algorithm to turn off the taps when
filling the bath.

FLOWCHART                                  PSEUDO-CODE

Start
1. START
2. TURN ON TAPS
Turn on                     3. REPEAT
taps                            3.1. LET THE WATER FLOW
3.2. UNTIL BATH IS FULL
NO                           YES        4. TURN OFF TAPS
Is the bath
full?                    5. STOP

Stop                         Turn off
taps

When designing a solution it is important to identify 3 things:
1. The input (or inputs);
2. The processing;
3. The output (or outputs).

Designing a solution to a problem                                                      -1-
Computer Studies                                                                Notes

Pseudo-code (or pseudocode)

Pseudo-code is writing an algorithm as close as possible to computing languages
Pseudo-code is useful for describing algorithms in a structured way. It makes use of
simple English-like statements.

Flowchart

A Flowchart is a graphical representation for an algorithm.
A picture can say a thousand words! That is why programmers use flowcharts to
display their ideas. Flowcharts easily display the way a program naturally flows from
one statement to the next. The following are the symbols used when drawing
flowcharts.

Designing a solution to a problem                                                 -2-
Computer Studies                    Notes

Designing a solution to a problem    -3-
Computer Studies                    Notes

Designing a solution to a problem    -4-
Computer Studies                    Notes

Designing a solution to a problem    -5-

```
To top