TABLE OF CONTENTS
Ethical practices in coding ...............................................................................1
Variables in Real Life ......................................................................................2
1.1 What will you learn in this chapter? .......................................................2
1.2 What is Variable Initialization? ..............................................................2
1.3 Data Types in programming ..................................................................6
1.4 How do we validate user input in programming? .......................................6
1.5 Math Operations in Programming...........................................................7
1.6 Quiz Time ..........................................................................................8
1.7 What have you leant in this chapter? .................................................... 10
Sequencing with Block Coding........................................................................ 11
2.1 What will you learn in this Chapter? ..................................................... 11
2.2 Recap of Loops ................................................................................. 11
2.3 What is Sequencing? ......................................................................... 11
2.4 Examples of Sequence, Selection and Iteration ....................................... 12
2.5 What is a Bug? ................................................................................. 14
2.6 Activity Drawing Rectangle.................................................................. 14
2.7 Fun Activity: Chase the Apple.............................................................. 20
2.8 Types of Loops.................................................................................. 30
2.9 Apply Loops and Conditionals with sequencing....................................... 30
2.10 Is there a better way to apply sequencing? .......................................... 31
2.11 Activity: Distributing Birthday Sweets ................................................ 34
2.12 Quiz Time ..................................................................................... 36
2.13 What have you learnt in this chapter? ................................................ 37
Fun with Functions ...................................................................................... 38
3.1 What will you learn in this chapter? ..................................................... 38
3.2 What exactly are Functions? ............................................................... 38
3.3 Examples of Functions in Arcade ......................................................... 39
3.4 Activity: Adding two integers ............................................................... 42
I
3.5 How to reduce redundancy using Functions? ......................................... 44
3.6 Advantages of using Functions ............................................................ 44
3.7 What are different Function Parameters? ............................................... 45
3.8 Activity – Finding the square of a number.............................................. 45
3.9 Activity – Arranging the Books ............................................................. 47
3.10 Activity: Calculating area of a circle ................................................... 48
3.11 Can Function return a value? ........................................................... 57
3.12 What is an event? ........................................................................... 65
3.13 What are Event Handlers? ............................................................... 65
3.14 Quiz Time ..................................................................................... 66
3.15 What have you learnt in this chapter? ................................................ 68
Understanding Arrays & Collections ................................................................ 69
4.1 What will you learn in this chapter? ..................................................... 69
4.2 What are Collections? ........................................................................ 69
4.3 Activity – Algorithm for a perfect square ................................................ 69
4.4 Activity Building a Zoo ....................................................................... 70
4.5 What are Arrays? .............................................................................. 77
4.6 Examples of arrays using Arcade ......................................................... 82
4.7 How can we iterate over collections? ..................................................... 83
4.8 Modifying Collections ......................................................................... 83
4.9 Quiz Time ........................................................................................ 85
4.10 What have you learnt in this chapter? ................................................ 86
Hello World with Code................................................................................... 87
5.1 What will you learn this chapter? ......................................................... 87
5.2 What is a Programming Language?....................................................... 87
5.3 Activity – Sorting the list..................................................................... 88
5.4 Getting used to syntax ....................................................................... 90
5.5 What are Variables and Data types in programming? ............................... 91
5.6 Activity: Building a Calculator ............................................................. 92
5.7 Quiz Time ........................................................................................ 98
5.8 What have you learnt in this Chapter? ................................................ 100
References ................................................................................................ 101
II