CODING BASICS FOR KIDS
CODING YODA NESTANDBIRDS
BOOMIKA K
TABLE OF CONTENTS 1. 2. 3. 4. 5. 6. 7. 8.
Introduction What is coding? What is a program? What is block coding? How to code? Learn to code. Exercise & Solution-1. Exercise & Solution-2.
01 INTRODUCTION Computers can’t think and won’t do anything by itself. It does what the human instructs it to do. Let’s say for example: How teachers give us instruction to do things? How parents give us directions to do our daily routine?
02 WHAT IS CODING? People talk with each other by help of languages like English, Tamil, Hindi. Similarly coding is a way through which people talk or instructs computers what to do. And the language used by the programmer to write a set of instructions to the computer is “programming language.”
03 WHAT IS A PROGRAM? A Set of instructions which are written in a detailed way a Computer can understand is known as program. If the program is incorrect then we get errors.
04 WHAT IS BLOCK CODING? Block coding is the most basic form of coding. The complex lines of computer codes are made into code blocks by humans to avoid errors. Each block has in built codes in them. You can get a clear idea about this while doing some exercises in the upcoming parts. Let’s see!!
05 HOW TO CODE? Let’s say we have a robot, and we have to give instructions to do a task. How about: “Making a cup of coffee”. 1.Take a cup. 2.Add 2 spoons of sugar. 3.Add a Spoon of coffee. 4.Add half cup of milk. 5.Take a spoon. 6.Mix the Ingredients. 7. Serve. Above are steps to make a coffee, but these can be understood and executed by a human being and not by a robot. Here is why ??
The robot executes the first step “Take a cup.” Now let’s see the second step “Add 2 spoons of sugar” the problem here is, it doesn’t know how to take a spoon of sugar unless you give a detailed instructions. And where to add it because it was not mentioned in the step. This is why it’s said “THINK LIKE A COMPUTER” to code.
Let’s see another example of our daily routine. ”Brushing our teeth”. The following are steps involved: 1.Take a brush with paste on it. 2.Hold it under tap. 3.Turn on tap water. 4.Hold it for 3 seconds. 5.Take it away. 6.Close the tap. 7.Start to brush. The above process of making a step by step instruction plan to solve a problem is called Algorithm in coding. It is the first and most important process in coding.
06 LEARN TO CODE?
Lets start with basics by learning how to code without a computer. Give directions to the rabbit so that it can reach the box where the carrot is Placed in a way it can be escaped from fox using pointers below. “Move left”
“Move up”
Here simple task “Finding path” is given in the steps below:
1. Move up one step. 2. Move left one step. If the above mentioned steps are executed in the wrong order, Let’s say: 1. Move left one step. 2. Move up one step. The rabbit will get caught by the fox in the first step.
And so the process of finding right path to the carrot by rabbit will become incorrect. So right order of the steps to be executed is very important and is called Sequencing in coding. SEQUENCING is the specific order in which steps are carried out in an algorithm.
07 EXERCISE-1
Lets see some more exercise below. Help the little girl to get back to her house in few steps possible using pointers below: “Move Right” “Move straight” “Move Up”
SOLUTION-1 Hurray!! You did it. The little girl is united with the family. Well done!! You have started to code. Let’s see whether your code is the right one to the above exercise.
Number of steps involved: 4 Code:
Above instructions can be reduced to three steps as below: 1.Move one step left. 2.Move two steps straight. 3.Move one step up.
08 EXERCISE-2
Help Santa to reach the house for Christmas to give away gifts for the kids. Use below pointers to give instructions.
“Move Straight” “Move Right”
“Move Up”
SOLUTION-2 Yes!! You did it again. After two exercises you get a idea about the coding right? yes!! It’s easy. Let see the solution.
Number of steps involved: 4 Code:
1. Move 2.Move 3.Move 4.Move
one one one one
step step step step
right. up. right. straight.
See you in next part
This book guarantees that kids can learn about coding with lots of fun and excitement. It also focus on pre coding and learning to code without a computer. Coding develop skills such as
logical
thinking,
pattern
recognition,
decomposition and develops problem solving skills to make coding easier. BOOMIKA KUMARARAJA AUTHOR
Special Thanks to NAVALAN V
Editing Credits SATHYA S
Thanks to Code.org csunplugged.org
All items and design are subjected to copyright by Nestandbirds