04-Scratch Computing Wonders
Navigation Bar Green Flag (Run) & Red Stop Sign (Stop)
Project Name
Tabs
Coding Area
Block Palette Sprite Pane Stage
Sprite List Backdrop Pane
Fig 4.5
Let’s discuss all the available block types in Scratch!
There are nine different types of blocks available in Scratch, each
one has a different color and function. See Fig 4.6 for all available
blocks.
1. Motion: This block palette allows you to make your sprite move in
different directions.
These blocks control the sprite’s movement.
2. Looks: The looks block Palette allows you to change the color, size,
and costumes of your sprite.
3. Sound: The sound block palette allows you to add the sound to your
program, you can add sounds from the already available sound library,
record the sound, or can upload it from your computers.
4. Events: Events blocks tell Scratch when to start running the
program by setting a triggering moment, such as clicking the green
flag.
5. Control: Control blocks are color-coded gold and are used to
control scripts. It gives you options to wait and use loops and
conditional statements in your program.
Fig 4.6 6. Sensing: Sensing blocks are one of the eight categories of Scratch
blocks. They are color-coded light blue and are used to detect things.
46
04-Scratch Computing Wonders
They can be used to determine the location of the mouse-pointer, its
distance from other sprites, and whether a sprite is touching another sprite.
7. Operators: The Operator blocks are used to compare variables and values,
do calculations with numbers, and work with strings (text).
8. Variables: The variable blocks allow you to make your blocks save variable
values that are used in the program.
9. My Blocks: My blocks allow you to create new blocks for a sprite. You give
the block a name and then define what the new block does using other
Scratch blocks.
4.3 Basic Functions
Let’s discuss some basic scratch functions!
4.3.1 Variables
Variables are storage, it is used to make calculations and show results. You can
store different types of data in a variable. Generally, you have two types of data
either numeric or string (text). A string is just a collection of letters, characters,
or words.
Numeric String
(Numbers) (Text)
Fig 4.7 Fig 4.8
47
04-Scratch Computing Wonders
Fig 4.9 How to create a variable:
> Click Variables, in the block palette. (1)
> Click Make a Variable. (2)
> The New Variable pop-up window will
appear. Type your variable name here. For
example, Apples. (3)
> Click OK. (4)
> A new variable will be created. (5)
> Click, hold, and drag the “set apples to
0” block to the coding area. (6)
> Click, hold, and drag the “set apples to
0” block to the coding area. (6)
> Set the value to 10. (7)
> To display the value in the stage area,
tick the checkbox. (8)
(Fig 4.9 and 4.10)
Fig 4.10
Let’s do it!
Create two variables that will hold the score of English and Mathematics. Sum
the score and save it in the third variable. Display all these variables.
48
04-Scratch Computing Wonders
4.3.2 Say
This command is to make a sprite say something. The say balloon will be displayed
on the stage area. For example, create a variable for the first name, then display
it (Fig 4.11). See Fig 4.12 for the output.
Fig 4.11
Let’s do it!
Explain the following block.
Fig 4.12
4.3.3 Input
You have the how to create and assign values to a variable. Now let’s see how you
can take values from users and use these values in variables. This function can be
performed by using the “ask and wait” block. See the example in Fig 4.13 and
4.14.
The result can be seen in Fig 4.12.
Fig 4.13
The ask and wait come with an
answer block, whatever the
user type can be read using the
answer block.
Fig 4.14
49
04-Scratch Computing Wonders
4.4 Looks and Sound Fig 4.15
Everything related to the appearance of
the sprite and backdrop (background) can
be changed and controlled using the looks
from the block palette. You can change the
sprite costume, size, color, make the sprite
disappear, and so on. Let’s change the size
and costume of a sprite.
How to change the look:
> Click Looks, in the block palette. (1)
> Click, hold and drag the next costume block
to the coding area. (2)
> Click, hold, and drag the set size to 100 %
block to the coding area. (3)
> Connect set size to 100 % block to the
next costume block. (4)
> Set the value to 200 % to make it appear
bigger. (5) (Fig 4.15 and 4.16)
If you keep clicking Fig 4.16
the code blocks in the
coding area, the sprite
will change its
costume. Fig 4.17 and
4.18.
Fig 4.17 Fig 4.18
50
04-Scratch Computing Wonders
You can also change the sprite looks using the costume tab. (Fig 4.19)
How to add sound: Fig 4.19
> Click Sounds, in the block palette. (1)
> Click, hold and drag the start sound Meow Fig 4.20
block to the coding area. (2)
> Click, hold and drag the set volume to 100 51
% block to the coding area. (3)
> Connect set size to 100 % block to the
start sound Meow block. (4)
> Set the value to 10%. (5) (Fig 4.20, 4.21)
Fig 4.21
04-Scratch Computing Wonders
You can add different sounds by using the Sounds tab. (Fig 4.22)
Fig 4.22
More sound:
> Search for available sounds by clicking the search button. (1)
> You can also record your voice by clicking the record button. (2)
4.4 Events
Let’s learn events! Events in programming
are similar to the events in your real life.
For example, your birthday will be on a
specific date. You will only celebrate your
birthday on that date. Just like that event
block only run when a specific event is
performed by the user. For example,
clicking the green flag. Your code will only
run whenever you click the green flag!
Events blocks are always the starting
block of your code. They are also
independent blocks i.e.; you do not connect
them to any block instead all blocks are
connected to the event block.
52
04-Scratch Computing Wonders
How to use events:
> Click Events, in the block palette. (1)
> Click, hold and drag the when green flag
clicked block to the coding area. (2)
> Add some block of code below it. (3)
> Click the green flag above the stage. (4)
(Fig 4.23 – 4.25)
Fig 4.24 Fig 4.23
Fig 4.25
Let’s do it!
There are different types
of event blocks, explore
them.
53
04-Scratch Computing Wonders
4.5 Motion
To move the sprite, you can use the blocks in Motions. Let’s move a sprite few
steps.
How to move a sprite:
> Click Events, in the block palette. (1)
> Click, hold and drag the when green
flag clicked block to the coding area.
(2)
> Click Motion, in the block palette.
(3)
> Click, hold and drag the move 10
steps. (4)
> Connect the move 10 steps below
when green flag clicked. (5)
> Change value to 50. (Fig 4.26 – 4.29)
Fig 4.27 Fig 4.26
Fig 4.28 Fig 4.29
54
04-Scratch Computing Wonders
4.6 Cat and Mouse Chase Game
In this game, there will be two
sprites, a cat and a mouse. To
add another sprite, click on Add
button shown in Fig 4.30.
Search the mouse after clicking
the add button and add it.
Both sprites will have separate Fig 4.30
codes.
Let’s discuss the game logic!
The mouse will follow the “mouse-cursor” on the screen. The Cat will be following
the Mouse. If any character hits the stage boundary they will bounce and change
their direction. The player has to avoid the Cat from catching the Mouse.
Fig 4.31 Fig 4.32
55
04-Scratch Computing Wonders
Choose the right one!
1. How many types of programming languages are there?
a. 1 ☐
b. 2 ☐
c. 3 ☐
d. 4 ☐
2. Which programming language you learned in this chapter?
a. Python. ☐
b. C++. ☐
c. Scratch. ☐
d. None of the above. ☐
3. How many different types of block palettes you have in Scratch?
a. 3 ☐
b. 6 ☐
c. 9 ☐
d. 12 ☐
4. _________________ can be used as storage?
a. Variable. ☐
b. Container. ☐
c. Basket. ☐
d. None of the above. ☐
5. ____________ block is always the starting block in your program?
a. Motion. ☐
b. Looks. ☐
c. Control. ☐
d. Events. ☐
56
04-Scratch Computing Wonders
Answer the following!
1. Define the term programming?
2. Define the term algorithm?
3. Define variables?
4. Define what are Event blocks?
57
04-Scratch Computing Wonders
5. Write the steps to add sound to your program?
58
0 5S e ct i o n
STEM ACTIVITY
Students will learn :
1. Objective
2. Introduction
3. Materials
4. Instructions
5. What Happened?
6. Observations
7. Precautions
05-STEM Activity Computing Wonders
Mars Helicopter FUN FACT
5.1 Objective Igor Sikorsky designed the first successful
In this activity, you’ll helicopter in the late 1930s. His inspiration
explore how some things fall came from drawings of an aircraft with
and how varying the size of a spinning wing, drawn by Leonardo da
the rotor blades, the shape Vinci nearly five hundred years before.
of the rotor blades, and the
weight of a paper helicopter
affect the way a helicopter
spins.
5.2 Introduction
During the Mars mission,
NASA plans to explore the
surface of Mars using a
rover in combination with a lightweight helicopter. To
be able to fly on Mars, this helicopter must be super
light and have very efficient blades. If not, it will
never generate enough lift to get off the ground. In
this activity, you will make your paper helicopter and
test different blade designs. Will your findings be
reflected in NASA's design? Try it out and see for
yourself!
5.3 Materials
● Paper Helicopter Template
● Scissor
● Paper Clips
● Measuring Tape
● Pencil
Fig 5.1
60
05-STEM Activity Computing Wonders
5.4 Instructions
1. Cut the template along the dashed lines. Sketch
the helicopter using solid and dashed lines if
you're using plain paper.
2. Fold the A and B propeller blades in opposite
directions along the solid lines. To give the body
of the helicopter rigidity and lower its center of
gravity for more stable flight, the X and Y panels
fold toward the center, and the Z panel is folded
upward.
Fig 5.3 Fig 5.2
3. Get up and grab
the helicopter's body.
Raise it as high as
possible in the air. Drop
it now. What are your
observations? What
direction do the blades
turn? Drop the chopper
from a higher vantage
point.
5.5 What Happened?
When you drop a paper helicopter, it will spin for a fraction of a second before
slowing down. Did you notice how it started spinning before it started falling
faster? When the paper helicopter spins, it should produce a "lift" force that
slows its descent to the ground. Because shorter blades generate less lift, the
paper helicopter with shorter blades should fall faster.
There may not be a single paper helicopter design that allows it to descend at the
slowest speed. Longer and wider blades that hit the air at an angle, on the other
hand, are generally better. These changes to the blades produce more lift, which
slows down the paper helicopter's fall. However, if you make too many changes to
the dimensions of your paper helicopter, it may become unstable and perform
poorly.
61
05-STEM Activity Computing Wonders
Because of the thin atmosphere on Mars, a helicopter's blades must be larger and
spin faster than on Earth to generate enough lift. The Ingenuity helicopter from
NASA is extremely light—only 4 pounds (on Earth)! The blades are approximately
2 feet (0.6 meters) long and rotate at a rate of 2400 times per minute. The
helicopter is powered by a solar panel and is self-contained. It's built to land
safely on the rocky terrain of Mars. This will aid NASA's Perseverance rover in
its exploration of the Martian surface.
5.6 Observations
Take an unfolded piece of paper the same size as the one you used to construct
the helicopter. Drop it in alongside the helicopter. Which one falls first? Make a
ball out of the piece of paper. At the same time as the helicopter, drop this paper
ball. Which one falls first? Can you figure out why? Hint: It has something to do
with air resistance.
Make some changes to your helicopter. Try folding the bottom up one more fold,
or shortening or changing the shape of the blades. How does the performance of
your helicopter change? Why? Can you figure out a way to make your helicopter
blades turn faster or slower?
Fig 5.4
62
05-STEM Activity Computing Wonders
AA
YY
63
05-STEM Activity Computing Wonders
Mars Helicopter
64
05-STEM Activity Computing Wonders
Distance
Attempts
Attempt 1
Attempt 2
Explain your Observation?
5.7 Precautions
You should be careful when dropping the helicopters from high locations.
65
0 6S e ct i o n
EXCEL
Students will learn :
1. What is a spreadsheet?
2. Features of MS Excel
3. Row, Column, and Cell
4. Insert Numbers and Text
5. Simple Calculations
06-Excel Computing Wonders
6 EXCEL
6.1 What is a spreadsheet?
People used to do calculations on paper by hand in the past, and they made a lot
of mistakes. Then calculators were introduced and made it easier to avoid
mistakes. Dealing with a lot of information was, however, highly challenging and
time-consuming, particularly for businesses. Spreadsheets solve all of the
problems that were a problem in the past and are no longer a problem today. But
what exactly is a spreadsheet? Let's get started with Microsoft Excel. It's a
spreadsheet program.
Fig 6.1
A spreadsheet is a software that replicates a worksheet on paper. It’s like a large
sheet (like a sheet of paper) that has many cells in a grid of rows and columns.
Users can put words or numbers into the cells, to make headings and store
information (usually numbers). Spreadsheets are most commonly used for
automatic calculations. Spreadsheets are also used to analyze data and create pie
charts and graphs.
67
06-Excel Computing Wonders
Fig 6.2
This is an example of a spreadsheet. On a
spreadsheet, you can enter numbers but also
text. All this information is called data. Here
you can see names of students, marks of the
different subjects and total (sum) of the marks.
E.g., Ali scored 85 marks in Math, 75 in English,
68 in Urdu etc. Ali has scored Total marks of
6.2 Features of MS Excel
The image below shows the composition of features in MS Excel:
Fig 6.3
• Home: includes options like font size, font styles, font color, background
color, alignment, formatting options and styles, insertion and deletion of
cells, and editing options
• Insert: includes options like table format and style, inserting images and
figures, adding graphs, charts, and sparklines, header and footer options,
equations, and symbols.
• Page Layout: includes options like Themes, orientation, and page setup
options.
• Formulas: Since MS Excel allows you to create tables with a lot of data,
using this feature, you can add formulas to your table and get quick
solutions.
68
06-Excel Computing Wonders
• Data: This area includes options for adding external data (from the web),
filtering, and data tools.
• Review: Proofreading can be done for an excel sheet (like spell check) in
the review category and a reader can add comments in this part.
• View: Different views in which we want the spreadsheet to be displayed
can be edited here. Options to zoom in and out and pane arrangement are
available in this option.
6.3 Row, Column, and Cell
Spreadsheets appear as rectangular grids, or sheets, that are made up of
columns, rows, and cells. We enter data in these cells. Let’s open a new
spreadsheet and let's look more closely.
How to open a new spreadsheet:
> Click Start
> In the Search programs and files text
box, type Excel and press Enter. The
program will appear on screen.
This is a
cell.
69
06-Excel Computing Wonders
This is a row. Each row has a number
(1, 2, …) on left-hand side. These
numbers are names of the rows.
This is a
column. Each
column has a
capital letter
(A, B, …) at
the top.
These letters
are names of
the column.
70
06-Excel Computing Wonders
You can also see Each cell contains a unique name, using
the name of the the column and row labels. Cell B2, for
active cell in the example, is in column B, row 2.
top left corner of
the spreadsheet. When you click the cell, it become active
and its border gets thicker.
6.4 Insert Numbers and Text
It's simple to enter numbers and text in an Excel spreadsheet. Simply click on
the cell in which you want to type, enter the data you'd like, and then move on to
another cell. When you enter text and numbers in the same cell, the program
treats it as text.
How to enter text in a spreadsheet:
> Open a new spreadsheet.
> Go to cell A1 and type the word, Classes. (1)
> Press -> to go to B1 and type the word, Girls. (2)
> Press -> to go to C1 and type the word, Boys. (3)
> Now go to cell A2 and type the phrase Class 5A (4) and then go to cell A3 and type
Class 5B. (5)
71
06-Excel Computing Wonders
72
06-Excel Computing Wonders
How to enter number in a spreadsheet:
> Type 24 in cell B2 and C2. (1)
> Type 27 in cell B3 and C3. (2)
> Now save the spreadsheet, just like Microsoft Word click File then Save as then
select the folder where you want to save the file. Don’t forget to give name to your
spreadsheet.
If you input more text than the cell can accommodate, only a portion of a text
will be seen. However, the rest of the text isn't lost. Drag the right edge of the
column heading to modify the column width. The row height can be adjusted in
the same way. You can format numbers or text in a cell, just like Microsoft Word
using the Home tab.
Drag to resize.
73
06-Excel Computing Wonders
6.5 Simple Calculations
Now it’s time to look at how easy it is to make calculations. You can multiply, divide,
add, or subtract numbers.
How to add numbers in a spreadsheet:
> Locate and open the spreadsheet that you made in the previous task. (1)
> How can we determine how many boys and girls are in Class 5A? Go to cell D2, type
=B2+C2 and press Enter. (2)
74
06-Excel Computing Wonders
Change the numbers in cell B2 or C2 and observe the difference in cell D2. The
great thing about spreadsheets is that when you have a spreadsheet filled with
calculations, you can modify the numbers and the results of the formula results
will update accordingly.
You can also use the following symbols to perform other
calculations:
➢ The minus sign (-) to subtract numbers, for e.g.: =B2-C2
➢ The asterisk sign (*) to multiply numbers, for e.g.: =B2*C2
➢ The slash sign (/) to divide numbers, for e.g.: =B2/C2
How to complete a calculation:
> Click cell D3 (1) and type =B3+C3. Cell D3 should display the number 54. (2)
> Go to cell D1 and type the word Total. (3)
> Use formatting tools to choose colors, make the text bold, add borders etc. to
the existing table. On the Home tab, in the Styles group, explore the Cell Styles!
Make the same table as given In (4)
The sum or
result of the
addition is 48.
It will be
displayed in
the cell D2.
The calculation
you used
(=B2+C2) is the
formula.
75
06-Excel Computing Wonders
Let’s do it!
Your school is organizing two field trips. Class 5A will attend a field trip to
Museum and Class 5B to the Biscuit factory. The cost of each field trip is
different. Create the spreadsheet below that contains all information regarding
field trips. Then take a look at the questions and do calculations to complete the
empty cells.
76
06-Excel Computing Wonders
How many students How much money will How much money will
are there in Class all the students of all the students of
5A? Class 5A pay for their Class 5B pay for their
field trip? field trip?
How many boys How many students How much money will
are there in are there in Classes all the students of
Class 5A and 5B? A and Classes B? Classes A and B pay
for their field trips?
77
06-Excel Computing Wonders
Choose the right one!
1. What are the basic rectangular building blocks of a spreadsheet?
a. Cells. ☐
b. Zoom slider. ☐
c. Help button. ☐
d. All of the above. ☐
2. Excel is a program that is used to prepare a ______.
a. Slide presentation. ☐
b. Spreadsheet. ☐
c. Text document. ☐
d. Database. ☐
3. When inserting a formula, the formula always starts with?
a. Equal sign. ☐
b. Colon. ☐
c. Comma. ☐
d. Space. ☐
4. In excel, columns are labeled by?
a. Letters. ☐
b. Numbers. ☐
c. Letters and Numbers. ☐
d. Words. ☐
5. In Excel rows are labeled by? ☐
a. Blocks. ☐
b. Boxes. ☐
c. Cells. ☐
d. Square.
78
06-Excel Computing Wonders
Answer the following!
1. Explain what is a spreadsheet?
2. What do you mean by cells in an Excel sheet?
3. What do you mean by cell address?
4. What will be the address of the cell formed by the combination of row 4
and column E?
79
06-Excel Computing Wonders
5. Explain the features of MS Excel?
80
Computing Wo n d e rs i s a n ex te n si ve c o m p u t i n g
curriculum se r ies of books tha t a dopts a new
activity based learning approach. The book
he l p s the st u d e nts u n d e rsta n d the c o n ce pts of
computer science and also helps them learn
21st Century skills.
Key Features:
-Ea sy to u n d e rsta n d ste p-by-ste p l e a r n i n g.
-E x te n si ve cove ra g e of cu r r i culu m.
-Effe cti ve i nte g ra tio n of 21st ce nt u ry sk ill s l ike co ll a bo ra tio n,
c r i ti c al th i n k i n g, c re a ti v i ty, p robl e m-so l v i n g a n d d e c i sio n-m a k i n g.
-E x te n si ve co nte nt to d eve lo p co d i n g sk ill s fo r a va r iety of
p ro g ra m mi n g l a n gu a g e s a n d too l s a n d e d u c a tio n al robots.
-O n l i n e re so u rce s to p rov i d e gui d a n ce to st u d e nts a n d te a c he rs al ike.
-Te a c he r gui d e s to supp o rt the m w i th ste p-by-ste p l e sso n pl a n s
Contact Us