flow charts. thinking creatively flow charts start end is a==6? no a = 1 yes print a a = a + 1

19
Flow Charts

Upload: marjorie-gardner

Post on 22-Dec-2015

213 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Flow Charts. Thinking Creatively Flow Charts START END Is A==6? No A = 1 Yes Print A A = A + 1

Flow Charts

Page 2: Flow Charts. Thinking Creatively Flow Charts START END Is A==6? No A = 1 Yes Print A A = A + 1

Thinking Creatively

• Flow ChartsSTART

END

Is A==6?No

A = 1

Yes

Print A

A = A + 1

Page 3: Flow Charts. Thinking Creatively Flow Charts START END Is A==6? No A = 1 Yes Print A A = A + 1

Thinking Creatively

• Flow Charts– Flowcharts are used to represent a process, showing the

steps of the process as different kinds of boxes, and arrows linking these boxes.

– They are commonly used for describing computer programs, but can be used for describing any process, and were developed in the 1920s for use by mechanical engineers.

Page 4: Flow Charts. Thinking Creatively Flow Charts START END Is A==6? No A = 1 Yes Print A A = A + 1

Symbols

Page 5: Flow Charts. Thinking Creatively Flow Charts START END Is A==6? No A = 1 Yes Print A A = A + 1

SymbolsTerminal

Input/Output Operation

Process

Decision

Page 6: Flow Charts. Thinking Creatively Flow Charts START END Is A==6? No A = 1 Yes Print A A = A + 1

Flowcharts

• So we start the flowchart with:

START

Page 7: Flow Charts. Thinking Creatively Flow Charts START END Is A==6? No A = 1 Yes Print A A = A + 1

Flowcharts

• The flowchart with will finish with the following:

END

Page 8: Flow Charts. Thinking Creatively Flow Charts START END Is A==6? No A = 1 Yes Print A A = A + 1

SEQUENCE

Page 9: Flow Charts. Thinking Creatively Flow Charts START END Is A==6? No A = 1 Yes Print A A = A + 1

Flowcharts

• Flowcharts are read starting at the beginning and working its way to the end.

• This is a basic assumption of all flowchart design.

• We call this SEQUENCE.

Page 10: Flow Charts. Thinking Creatively Flow Charts START END Is A==6? No A = 1 Yes Print A A = A + 1

START

END

Statement1

Statement2

Flowcharts

Page 11: Flow Charts. Thinking Creatively Flow Charts START END Is A==6? No A = 1 Yes Print A A = A + 1

SELECTION

Page 12: Flow Charts. Thinking Creatively Flow Charts START END Is A==6? No A = 1 Yes Print A A = A + 1

Flowcharts

• What if we want to make a choice, for example, do we want to add sugar or not to the tea?

Page 13: Flow Charts. Thinking Creatively Flow Charts START END Is A==6? No A = 1 Yes Print A A = A + 1

Flowcharts

• What if we want to make a choice, for example, do we want to add sugar or not to the tea?

• We call this SELECTION.

Page 14: Flow Charts. Thinking Creatively Flow Charts START END Is A==6? No A = 1 Yes Print A A = A + 1

START

END

Is Sugar required?

NoYesAdd Sugar Don’t Add Sugar

Flowcharts

Page 15: Flow Charts. Thinking Creatively Flow Charts START END Is A==6? No A = 1 Yes Print A A = A + 1

ITERATION

Page 16: Flow Charts. Thinking Creatively Flow Charts START END Is A==6? No A = 1 Yes Print A A = A + 1

Flowcharts

• What if we need to indicate that we need to keep doing something until some condition occurs?

Page 17: Flow Charts. Thinking Creatively Flow Charts START END Is A==6? No A = 1 Yes Print A A = A + 1

Flowcharts

• What if we need to indicate that we need to keep doing something until some condition occurs?

• Let’s say we wish to indicate that the you need to keep filling the kettle with water until it is full.

Page 18: Flow Charts. Thinking Creatively Flow Charts START END Is A==6? No A = 1 Yes Print A A = A + 1

Flowcharts

• What if we need to indicate that we need to keep doing something until some condition occurs?

• Let’s say we wish to indicate that the you need to keep filling the kettle with water until it is full.

• We call this ITERATION.

Page 19: Flow Charts. Thinking Creatively Flow Charts START END Is A==6? No A = 1 Yes Print A A = A + 1

START

END

Kettle is not full?

No

Yes

Keep Filling Kettle

Flowcharts