Page 21 - Touchcode_C7_Flipbook
P. 21
Benefits of using sequences in coding:
Our manner of thinking can be easily replicated in sequence programming.
Sequence of programming reflects logical thinking.
To design algorithms, there are three basic building blocks which will help you to convert
complex problem into well-defined solution. The building blocks are:
Sequencing
Selection
Iteration
Life Skills and Values
Example 1: Algorithm for your morning routine.
Step 1: Wake up
Step 2: Brush your teeth
Step 3: Take a bath
Step 4: Have breakfast
Step 5: Go to school
Experiential Learning
Example 2: Algorithm to make a sandwich.
To make a sandwich you need to follow the given steps, if you miss any step then the
result will be different from the expected one.
Step 1: Get two slices of bread, jam and butter.
Step 2: Spread jam on one slice of bread and butter on the other slice of bread.
Step 3: Put the two pieces of bread together.
But is it really so simple? Where’s the bread? How do you ‘spread’? How do you put the two
pieces of bread together?
You know how to do these things, but how to tell a computer to make a sandwich? When
you write an algorithm for a computer, you have to be very specific, and you have to speak
the computer’s language. You can do this by using a programming language.
In programs, tasks need to be done in the correct sequence to get the desired output.
Sequencing with Block Coding 19

