Part 1 — Introduction: how a computer represents information (printed pp 105–106)
The unit opens with its Student Learning Outcomes (printed p 105): understand the information representation system; the binary and decimal number systems and the difference between them; convert decimal to binary and vice versa; encode and decode text in binary using ASCII; encode and decode images in binary; apply fundamental programming concepts; and create multi-sprite and multi-script programs using a visual programming tool.
4.1 Representation of Information. A computer cannot understand text, pictures or sounds the way humans do. Instead, it uses numbers to represent all kinds of information. Inside a computer, everything — text, images, videos or sound — is converted into numbers. These numbers are made up of 0s and 1s and are called binary numbers. The book's Figure 4.1 shows everyday data (pictures, letters, numbers, symbols) on one side and rows of 0s and 1s — the computer data — on the other.
📚 Book Vocabulary — Words in this part
number system — A method of writing or showing numbers using digits or symbols. ⭐Book word
binary number — A number written in the binary system, using only the digits 0 and 1. ⭐Book word
🌱 Extra Help Words — Words in this part
sequence — The order in which instructions run, one after another from top to bottom.
Part 2 — 4.2 Number System: the four types (printed p 106)
A number system is a method of writing or showing numbers using digits or symbols. In computers, number systems are used to store data and perform calculations. There are four common types of number system, as shown in the book's Figure 4.2:
| Number system | Base | Digits / symbols used |
|---|---|---|
| Decimal | Base 10 | 0–9 |
| Binary | Base 2 | 0–1 |
| Octal | Base 8 | 0–7 |
| Hexadecimal | Base 16 | 0–9, A–F |
📚 Book Vocabulary — Words in this part
decimal number system — The base-10 number system used in everyday life; it uses the digits 0 to 9. Also called the denary system. ⭐Book word
binary number system — The base-2 number system used by computers; it uses only the digits 0 and 1. ⭐Book word
octal number system — The base-8 number system; it uses the digits 0 to 7. ⭐Book word
hexadecimal number system — The base-16 number system; it uses sixteen symbols: 0 to 9 and A to F. It is also called 'hex'. ⭐Book word
base — The number of different digits or symbols a number system uses: decimal has base 10, binary base 2, octal base 8 and hexadecimal base 16. ⭐Book word
🌱 Extra Help Words — Words in this part
input — Something given to a program, such as a key press, a mouse click or a value to convert.
Part 3 — 4.2.1 to 4.2.4 The four number systems in detail (printed p 107)
4.2.1 Decimal / Denary Number System. The decimal number system is commonly used in everyday life and uses digits from 0 to 9, therefore it is known as the Decimal Number System. Each digit's place value depends on its position and is represented as a power of 10. How it works, for the book's example 4872:
- In the decimal system, read digits from right to left.
- The right-most digit is the ones place (100); the next digit is the tens place (101); the next is the hundreds place (102); the next is the thousands place (103).
- So in 4872: 4 is in the thousand's place, 8 in the hundred's place, 7 in the ten's place and 2 in the one's place, and the value is read as "Four thousand, eight hundred and seventy-two".
4.2.2 Binary Number System. The binary number system is the fundamental system used in a computer. It uses only two digits, 0 and 1, to represent all data, because a computer understands two states: on (1) and off (0).
4.2.3 Octal Number System. "Octa" is a Greek word which means eight. The Octal Number System (base-8) uses digits 0 to 7 and was an important bridge between binary (machine language) and human-readable formats in early computing.
4.2.4 Hexadecimal Number System. The hexadecimal number system has a base value equal to 16. It is also pronounced sometimes as "hex". Hexadecimal numbers are represented by only 16 symbols: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E and F.
📚 Book Vocabulary — Words in this part
denary — Another name for the decimal (base-10) number system. ⭐Book word
place value — The value of a digit because of its position in a number — for example, in 4872 the 8 has place value 800 because it is in the hundreds place. ⭐Book word
🌱 Extra Help Words — Words in this part
output — What a program produces or shows — a result on the stage, a message, a sound or a final score.
Part 4 — 4.3.1 Converting a decimal number to binary: Method 1 (printed pp 107–108)
4.3 Conversion of Number System. One important part of number systems in computers is being able to change numbers from one system to another. This is helpful for understanding how computers store and process data in different ways. The book teaches the two most common conversions, starting with decimal to binary.
Method 1 — successive division by 2. Consider the conversion of the denary number 15 into binary. Start with the denary number 15 and divide it by 2. Write the result of the division including the remainder (even if it is 0) under the 15 (that is, 15 ÷ 2 = 7 remainder 1); then divide again by 2 (that is, 7 ÷ 2 = 3 remainder 1) and keep dividing until the result is zero. Finally, write down all the remainders in reverse order.
| Division | Result | Remainder |
|---|---|---|
| 2 │ 15 | 7 | 1 |
| 2 │ 7 | 3 | 1 |
| 2 │ 3 | 1 | 1 |
| 2 │ 1 | 0 | 1 |
Hand trace: the remainders are 1, 1, 1, 1. Read them from bottom to top (the book also labels this "Read up"): Binary = 1111. Check: 8 + 4 + 2 + 1 = 15 ✓ — the printed result is correct.
📚 Book Vocabulary — Words in this part
conversion — Changing a number from one number system into another, such as changing a decimal number into binary. ⭐Book word
remainder — The amount left over after a division — in successive division by 2, the remainders (read upwards) form the binary number. ⭐Book word
dividend — The number that is being divided — in the book's conversion diagram, the denary number being divided by 2. ⭐Book word
Part 5 — Method 2, more worked examples and Activity Time (printed pp 108–109)
Method 2 — subtracting powers of 2. The denary number 15 is made up of 8 + 4 + 2 + 1 (that is, 15 − 8 = 7; 7 − 4 = 3; 3 − 2 = 1; at each stage, subtract the largest possible power of 2 and keep doing this until the value 0 or 1 is reached). This gives an 8-bit binary number: put 1 under each power of 2 that is used (8, 4, 2 and 1) and 0 under the others (128, 64, 32, 16).
Example: (25)10 to (?)2. Method 1: 25 ÷ 2 = 12 remainder 1 (first remainder); 12 ÷ 2 = 6 remainder 0 (second); 6 ÷ 2 = 3 remainder 0 (third); 3 ÷ 2 = 1 remainder 1 (fourth); 1 ÷ 2 = 0 remainder 1 (fifth). Read up: Binary Number = 11001. Method 2 agrees: 25 = 16 + 8 + 1, so the bits under 16, 8 and 1 are 1 and the bits under 4 and 2 are 0 — 11001 ✓ (hand-traced; the printed example is correct).
Example: (31)10 to (?)2 (printed p 109). Method 1: 31 ÷ 2 = 15 r1; 15 ÷ 2 = 7 r1; 7 ÷ 2 = 3 r1; 3 ÷ 2 = 1 r1; 1 ÷ 2 = 0 r1 — read up: (31)10 = (11111)2 ✓. Method 2: 31 = 16 + 8 + 4 + 2 + 1, five 1-bits ✓.
The Activity Time box on printed p 109 asks you to convert 54, 21, 35 and 47 into binary. All four are solved in the Solved Exercise tab.
🌱 Extra Help Words — Words in this part
execute — To run a program or a block and carry out its instructions.
trace — To follow a program by hand, step by step, working out the values and the final result — used to check what a script really does.
Part 6 — 4.3.2 Converting a binary number to decimal (printed pp 109–110)
Consider the conversion of the binary number 1011 into denary.
Method 1 — column values. Each time a 1-value appears in a binary number column, the column value (heading) is added to a total. For 1011, the 1-bits sit under the columns 8, 2 and 1:
| 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
|---|---|---|---|---|---|---|---|
| 1 | 0 | 1 | 1 |
The equivalent denary number is 8 + 0 + 2 + 1 = 11 ✓ (hand-traced; printed correctly).
Method 2 — powers of 2. Write each binary digit (right to left) with corresponding powers of 2 from right to left and add: (1011)2 = 1 × 23 + 0 × 22 + 1 × 21 + 1 × 20 = 1 × 8 + 0 × 4 + 1 × 2 + 1 × 1 = 8 + 0 + 2 + 1 = (11)10 ✓.
The Activity Time box on printed p 110 asks you to convert the binary numbers 1001, 1100, 1000 and 1010 into decimal. All four are solved in the Solved Exercise tab.
🌱 Extra Help Words — Words in this part
verify — To check a result by working it out in a second way, for example checking a binary conversion with the other method.
Part 7 — 4.4 Encoding and decoding, and 4.4.1 ASCII (printed pp 110–111)
4.4 Encoding and Decoding System. Computers are powerful machines, but are not intelligent such as humans. They do not think, guess, or feel. Instead, they depend on specific instructions written in a format they understand to perform any task. These instructions must be in a specific format such as binary (0s and 1s) or a programming language.
An encoding system is a way of changing data into a specific format therefore a computer can read, store, and process it. A computer only understands 0s and 1s (binary), so everything such as letters, numbers, images and sound must be converted into binary code. Example: changing the letter A into binary code will be 01000001 ✓ (hand-checked against the ASCII table below: A = 65 = 64 + 1).
Decoding is the process of changing the coded (binary) data back into its original form that humans can understand. Example: converting 01000001 back to the letter A.
4.4.1 Encoding and Decoding Text using ASCII. ASCII stands for American Standard Code for Information Interchange. It assigns each character (letters, numbers, symbols) a unique binary number. The book's Figure 4.3 gives the full table for a–z and A–Z; this page abridges that table to its pattern and endpoints instead of reproducing every row. The pattern to remember: capital letters run from A = 065 (01000001) to Z = 090 (01011010), and lowercase letters from a = 097 (01100001) to z = 122 (01111010); each next letter adds 1 to the code. (All 52 rows of the printed table were checked by hand against this pattern — the table is correct.)
📚 Book Vocabulary — Words in this part
encoding — Changing data into a specific format, such as binary code, that a computer can read, store and process. ⭐Book word
decoding — Changing coded (binary) data back into its original form so that humans can understand it. ⭐Book word
ASCII — American Standard Code for Information Interchange — a system that assigns each character (letter, number, symbol) a unique binary number. ⭐Book word
Part 8 — 4.4.2 Encoding and decoding images in binary using RGB (printed p 112)
An image is a picture or visual format that shows what something looks like or how it is seen. Images are classified into types; the book teaches two.
Binary images represent the most basic type of digital image. The permissible pixel values in binary images are 0 (Black) and 1 (White). Therefore, only two values are needed to define an image wholly, and a single bit is sufficient for storage — which is why binary images are also known as 1-bit images. In the book's Figure 4.4, an 8 × 8 grid of 0s and 1s draws a smiling face: the 1s form two square eyes and a smiling mouth on the black (0) background. The grid, exactly as printed, is:
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| 0 | 1 | 1 | 0 | 0 | 1 | 1 | 0 |
| 0 | 1 | 1 | 0 | 0 | 1 | 1 | 0 |
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 |
| 0 | 0 | 1 | 1 | 1 | 1 | 0 | 0 |
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Color images can be understood as having three layers: Red, Green and Blue (RGB), placed on top of each other. Each layer holds the brightness (intensity) of its color at every pixel. In a color image, each pixel is usually made up of 24 bits, with 8 bits coming from each color (Red, Green and Blue). In the book's Figure 4.5, one red pixel of a flower is encoded as R = 255 = 11111111, G = 0 = 00000000, B = 0 = 00000000 — full red, no green, no blue ✓ (hand-checked: 255 is eight 1-bits).
📚 Book Vocabulary — Words in this part
bit — A single binary digit — a 0 or a 1. Binary images need only 1 bit per pixel; each RGB colour uses 8 bits. ⭐Book word
pixel — One tiny dot of an image. Each pixel is stored as binary values — in a colour image, usually 24 bits (8 for red, 8 for green, 8 for blue). ⭐Book word
binary image — The most basic type of digital image, whose pixels can only be 0 (black) or 1 (white); also called a 1-bit image. ⭐Book word
RGB — Red, Green and Blue — the three colour layers placed on top of each other to make a colour image. ⭐Book word
🌱 Extra Help Words — Words in this part
interactive — Describes a program that responds to the user — games are interactive because they react to keys and clicks.
Part 9 — 4.5 Programming with Scratch: the tabs and the editor (printed pp 113–114)
Scratch programming is a visual, block-based coding platform to make programming easy, fun and creative. It is mainly used to teach kids and beginners the foundations of programming and computational thinking. The basics of Scratch were learnt in the previous class: the Scratch editor and its tabs (Code, Costumes, Sound).
- Code: contains 9 block palettes — Motion, Looks, Sound, Events, Control, Sensing, Operators, Variables and My Blocks (Figure 4.6, described in words: nine coloured circles, one for each palette).
- Costumes: used to design or edit the appearance of sprites (Figure 4.7 shows the costume editor with the cat sprite).
- Sounds: used to add or edit sounds for sprites (Figure 4.8 shows the sound editor and its waveform).
In the editor there are four labelled working areas (Figure 4.9; the book's sentence says "three main areas" but its figure labels and describes four — learn all four):
- Stage Area: the space where sprites perform actions and the program runs.
- Sprite Info Area: shows all sprites included in the project.
- Code Palette: contains coding blocks organized into categories.
- Script Area: where blocks are dragged and connected to create programs.
In this chapter students will learn about the advanced topics Events, Coordinates, and Conditions using mathematical operators on a variable using Scratch.
📚 Book Vocabulary — Words in this part
Scratch — A visual, block-based coding platform that makes programming easy, fun and creative, mainly used to teach kids and beginners. ⭐Book word
sprite — An object or character in Scratch that performs actions in a project, such as the Cat, the Chick or the Egg. ⭐Book word
costume — The appearance or look of a sprite, designed or edited in the Costumes tab; a sprite can switch costumes, like the egg switching to 'egg-b' when it hatches. ⭐Book word
sound — Audio that can be added or edited for a sprite in the Sounds tab, such as the Chirp sound in the game project. ⭐Book word
stage — The background area of the Scratch editor where sprites perform actions and the program runs. ⭐Book word
script area — The area of the Scratch editor where blocks are dragged and connected to create programs. ⭐Book word
code palette — The part of the editor that contains the coding blocks, organised into categories (palettes). ⭐Book word
Part 10 — 4.5.1 Events (printed pp 114–115)
An event is something a program knows about and reacts to, such as pressing a key, clicking a mouse button, touching the screen or any object. The Events code block palette contains these blocks (described in words):
- when (green flag) clicked — start the program.
- when space key pressed — responds when a specific keyboard key is pressed.
- when this sprite clicked — when a sprite is clicked, perform some action.
- when backdrop switches to backdrop1
- when loudness > 10
- when I receive message1
The first three are the ones this unit uses most; the book's table on printed p 115 gives their descriptions: green flag → Start program; key pressed → Responds to a specific keyboard key is pressed; sprite clicked → When a sprite is clicked perform some action.
📚 Book Vocabulary — Words in this part
event — Something a program knows about and reacts to, such as pressing a key, clicking a mouse button or touching the screen. ⭐Book word
backdrop — The background picture of the stage; an event block can start a script when the backdrop switches. ⭐Book word
🌱 Extra Help Words — Words in this part
sensor — Something that detects a change, such as loudness or touching; the Sensing palette holds blocks that report such detections.
Part 11 — 4.5.2 Changing a sprite's position (printed pp 115–116)
The position of a sprite can be determined by stage area coordinates. Scratch uses x and y coordinate numbers to indicate locations on the stage. The x coordinate gives the left–right position, and the y coordinate gives the up–down position. The coordinate of the centre of the stage is (x=0, y=0). On the book's stage diagram, x runs from -240 (left edge) to 240 (right edge) and y from -180 (bottom) to 180 (top). Remember the book's definition, printed in a box on p 115: "A Sprite in Scratch is an object or character that performs actions in a project."
Text alternative: the stage is a rectangle. The horizontal X axis runs from -240 at the left edge to 240 at the right edge; the vertical Y axis runs from -180 at the bottom to 180 at the top. The two axes cross at the centre, (0, 0). (Original diagram drawn for this page; the book's diagram is Figure 4.8 on printed p 115.)
Activity Time — How to change the position of a sprite. The simplest way to change a sprite's position in Scratch is using Motion blocks. The book's program is: (1) from Events, drag out when (flag) clicked; (2) from Motion, drag out go to x: 0 y: 0 — it will position the sprite in the centre of the stage; (3) from Motion, drag out glide 1 secs to x: 0 y: 0 and set the values of X and Y to the desired position; (4) snap all the blocks under the when-flag-clicked block. The finished script on printed p 116 is: when flag clicked → go to x: 0 y: 0 → glide 1 secs to x: 20 y: 30.
Hand trace: the cat starts at the centre (0, 0), then glides over 1 second to (20, 30) — it ends 20 steps right and 30 steps up from the centre. The book's sentence under the script says the cat "will move in Y direction (upward)"; strictly, it moves in both directions — x increases by 20 as well as y by 30.
📚 Book Vocabulary — Words in this part
coordinates — The pair of numbers (x, y) that gives the exact position of a sprite on the stage. ⭐Book word
x coordinate — The number that gives a sprite's left–right position on the stage; it runs from -240 (left edge) to 240 (right edge). ⭐Book word
y coordinate — The number that gives a sprite's up–down position on the stage; it runs from -180 (bottom) to 180 (top). ⭐Book word
glide — A Motion block that moves a sprite smoothly to given x and y coordinates over a chosen number of seconds. ⭐Book word
Part 12 — 4.5.3 Combining events and coordinates for automatic movement (printed pp 116–118)
To start the movement of a sprite when an event happens and change the sprite's coordinates without manual input, the book builds the movement step by step:
- Open the Scratch editor; from the Event block palette use when (flag) clicked.
- From Motion, select go to x: 0 y: 0 to set the position of the sprite to 0, 0 in x and y — the centre of the screen.
- From Control, use the forever block to keep the sprite moving.
- From Motion, use move 10 steps to make movement in the x coordinates (inside the forever block).
Hand trace (printed p 117): when the user clicks the green flag, the sprite moves in the x coordinates and moves out of the screen — the forever loop keeps adding 10 steps, so the cat walks off the right edge and does not come back ✓ (the book states this correctly).
- From Motion, use if on edge, bounce inside the forever loop to check the position of the sprite. If the sprite reaches the wall, the if-on-edge-bounce block will return the sprite back — and, as the book's screenshot shows, it changes its position upside down (the cat flips over when it comes back, because its direction reverses).
- To set the position of the sprite, use set rotation style left-right from Motion.
- Run the program: the sprite will move in the x coordinate and bounce (return) back when it hits the edges (walls) of the stage — now flipping left–right instead of turning upside down.
The final script is: when flag clicked → go to x: 0 y: 0 → forever { move 10 steps; if on edge, bounce; set rotation style left-right }. (In the book's printed script the rotation-style block sits inside the forever loop; setting it every pass is harmless — it simply keeps the left-right style switched on.)
The Activity Time box on printed p 118 gives two choices: allow a user to move a sprite (flying cat, parrot) using arrow keys, or make a sprite move automatically all over the screen without user intervention when the program starts. A suggested approach for both is given in the Solved Exercise tab.
📚 Book Vocabulary — Words in this part
forever loop — A Control block that repeats the blocks inside it again and again until the program is stopped. ⭐Book word
🌱 Extra Help Words — Words in this part
debugging — Finding and fixing mistakes in a program, such as a wait time that makes a countdown run far too long.
Part 13 — 4.5.4 Gaming Project: sprites, backdrop and variables (printed p 119)
By performing this activity, the user can build an interactive game with Scratch. It works with two sprites: one is Chick and the other is Egg. The user can select sprites from the available sprite list (the book's screenshots, described in words, show the sprite list with Chick, Egg and Egg2, the "Choose a Sprite" button, and a teacher's note: the teacher demonstrates to students how to choose different sprites and change costumes). Next, choose a backdrop to make the background of the stage attractive.
After setting up the sprites and backdrop, create three variables in the Variables code palette by clicking on "Make a Variable":
- Timer: used for counter or duration.
- Score: used for score count.
- Finish: used for determining the end of the game.
The code is then developed step by step in this sequence: (i) create a countdown for the game, which runs only for a minute; (ii) movement of the Chick sprite; (iii) movement of the Egg sprite; (iv) collision of the Chick sprite with the Egg sprite.
📚 Book Vocabulary — Words in this part
variable — A named container or storage box that holds a value; games use variables to keep track of scores, lives, timers and levels. ⭐Book word
🌱 Extra Help Words — Words in this part
memory — The part of a computer that stores data and values, including the values held in variables while a program runs.
Part 14 — Game script (i): creating the countdown (printed pp 120–121)
Select the first sprite, Chick, and drag and drop the code blocks as the book's eight steps describe:
- From the Events palette take the block when green flag is clicked.
- From Motion take go to x: y: to position the Chick sprite on the surface of the backdrop: go to x: -180 y: -120.
- From the Variables palette take the set block to initialise the variables with values: Score should be 0, Timer should be 0, and Finish should be empty.
- From Control take the repeat until loop block for calculating time, with the condition that the Timer variable equals 60; inside the loop, wait and add 1 to the Timer variable.
- Once the loop execution is completed, set the Finish variable to "finish", so the user can stop the execution of the program.
- From Looks take say and show the message "Time is Over!"
- From the same palette take think for 2 sec to show the result; the user may use the join block from Operators to join strings: think join "Your Score is" Score for 2 seconds.
- From Control take stop all to stop the execution of other code.
With the corrected wait, the finished countdown (printed p 121) reads: when flag clicked → go to x: -180 y: -120 → set Score to 0 → set Timer to 0 → set Finish to (empty) → repeat until Timer = 60 { wait 1 seconds; change Timer by 1 } → set Finish to finish → say "Time is Over!" → think join "Your Score is" Score for 2 seconds → stop all. The book confirms: "Above code snippet will create a Count down which will limit execution for 1 minute." The stage picture shows the variable monitors at the start (Timer 0, Score 0, Finish empty) and the Chick standing at the left of the grassy backdrop with the Egg at the right.
📚 Book Vocabulary — Words in this part
repeat until — A Control loop block that repeats its blocks until its condition becomes true, checking the condition before each pass. ⭐Book word
Part 15 — Game script (ii): movement of the Chick sprite (printed pp 121–122)
Write another code for the same Chick sprite, to jump (up-down movement) over the Egg sprite:
- From the Events palette take the block when key pressed — here, when space key pressed.
- From Control use the if–else block; use the Finish variable to check its value is equal to "finish".
- If the condition is true, the body of the if-block is executed: a message will show for 2 seconds with the score result — think join "Game Over! Your Score is" Score for 2 seconds — and after that the stop this script block executes, to stop the execution of the remaining blocks.
- In the else block, the sound of Chirp from the Sound palette is executed: start sound Chirp.
- A repeat 10 loop is executed to move the sprite in the y-axis upside, to feel like a jump in the air: repeat 10 { change y by 10 }.
- A repeat loop with change y by -10 executes to move the sprite in the y-axis downside, to feel like back to the ground from the air: repeat 10 { change y by -10 }.
- Change Score by 1 — increase the variable value by 1.
Hand trace of one space-key press while the game is running (Finish is not "finish", so the else branch runs): the Chirp sound plays; y increases 10 × 10 = +100 (the Chick jumps up); y then decreases 10 × 10 = −100 (it lands back at the same height — net change 0); Score increases by 1. If the game is already finished (Finish = "finish"), the press instead shows "Game Over! Your Score is …" for 2 seconds.
📚 Book Vocabulary — Words in this part
condition — A test in a program that is either true or false, such as 'Timer = 60' or 'x position > -10'; loops and if-blocks act on conditions. ⭐Book word
Part 16 — Game scripts (iii) and (iv): the Egg sprite and the collision (printed pp 123–124)
(iii) Movement of the Egg Sprite. Select the Egg sprite and write this code: when flag clicked → hide → wait 1 seconds → show → forever { go to x: 240 y: -145; glide 3 secs to x: -240 y: -145 }.
Hand trace: the egg is hidden for 1 second, then appears at the right edge of the stage (x = 240) on the ground line (y = -145) and glides left to x = -240 over 3 seconds; the forever loop then jumps it back to (240, -145) and repeats — so the egg keeps crossing the stage horizontally along the X-axis, as the book says. (The prose also says this script "switches its costume to egg-a"; in the printed blocks, the costume switch is actually in script (iv) below — the movement script itself contains no costume block.)
(iv) Collision of the Chick sprite with the Egg sprite. On the same Egg sprite (the book also calls it Egg2 in this step), develop this code, which will check whether the Egg touches (collides with the) Chick sprite: when flag clicked → switch costume to egg-a → wait until touching Chick? → switch costume to egg-b → set Finish to finish → stop all.
Hand trace: the egg starts as a complete egg (egg-a). The script waits until the moving egg touches the Chick; at that moment the costume changes to egg-b (the egg hatches), the Finish variable is set to "finish" — which ends the game: the Chick's space-key script will now show "Game Over!" — and stop all stops every script. The book's stage picture for this step shows exactly that end state: Timer 1, Score 13, Finish "finish", and the Chick saying "Game Over! Your Score is 13" ✓ — the printed example is consistent.
Printed p 124 shows both Egg scripts side by side in one figure and closes the project: "After setting up all code, press green button to start game and enjoy."
📚 Book Vocabulary — Words in this part
collision — When two sprites touch each other; the game checks for the collision of the Chick sprite with the Egg sprite. ⭐Book word
Part 17 — Summary (printed p 125)
- Computers use the binary number system (0 and 1) to store data and process all information.
- Encoding changes data into binary, thus a computer can use it.
- Decoding changes data back into human-readable format.
- ASCII (American Standard Code for Information Interchange) is a system that assigns a binary number to characters.
- Scratch programming is a friendly, visual coding platform that uses drag-and-drop blocks to create animations, games and interactive stories.
- A sprite is a character or object that can move, talk or interact.
- The stage is the background area where action happens.
- An event in Scratch is a trigger that starts a script. It could be a click, key press, broadcast message or background change.
- Events are essential to make programs interactive and responsive.
- A variable is like a container or storage box that holds a value; variables are used to keep track of scores, lives, timers and levels in games and projects.
🌱 Extra Help Words — Words in this part
revise — To go over work again carefully in order to improve it and fix mistakes before a test.
