HKICO_Scratch
HKICO_Scratch
- It was initially released in 2007 by Mitchel Resnick, who is the LEGO Paper
Professor of Learning Research and the head of the Lifelong Kindergarten Group
at the MIT Media Lab.
- The Scratch project has received financial support from the following
organizations:
National Science Foundation
Scratch Foundation
Siegel Family Endowment
Google
LEGO Foundation
Intel
Cartoon Network
Lemann Foundation
MacArthur Foundation
2. Operators
A B A OR B NOT (A OR B)
False False False True
True True True False
True False True False
False True True True
B. Relational Operators
Exercises
i. 10 < 5
ii. 3>2
iii. 7=7
iv. 4<6
v. -3 < -2
i) (10 > 5) and (3 < 2) i) not ((10 > 5) and (3 < 2))
iii) (10 > 5) and (7 = 7) iii) not ((10 > 5) and (7 = 7))
- ‘+’ (Addition)
- - (Subtraction)
- * (Multiplication)
- / (division)
10/5 = 2
- MOD (modulus)
10 MOD 2 = 0
i. 15 * 4 - 7 / 2
ii. 20 MOD 6.
iii. (8 - 3) * 2 + 10 / 5
iv. 25 / 5 - 3 + 4 MOD 2
v. 12 * 3 - 5 / 2
3. Broadcast
Broadcast is a message that user can send through the Scratch program
activating scripts with matching Hat blocks.
They are useful in creating games and animation projects as they trigger specific
scripts.
Example 1:
Example 2
Exercise_1
Exercise_2
Exercises_3
The sprite is supposed to do the following things in sequence:
1. Glide to a random postion
2. After that, it has to say it got a new place
3. Then, switch the costume
Check the following program and find out what happended.
4. Override blocks
2.
3.
After moving -20 steps, what is the position of x and y?
4.
The initial point is x:0 y:0. After clicking the green flag, what will be the position of x?
5.
The initial point is x:0 y:0. After pressing space key for 5 times, what will be the
position of x and y?
6.
Fill the x and y positions to get a square shape.
7.
The initial point is x:0 y:0. After clicking the green flag, what will be the position of x?
9.
The initial point is x:0 y:0. After repeating 10 times, what will be the position of x?
10.
The initial point is x:60 y:0. After repeating 5 times, what will be the position of x?
11.
2.
2. Complete the broadcast part. After that, rewrite the program using forever loop.
Wait until…………
1.
In Scratch, clone is spawn means you are creating a new instance or copy
of a sprite during the runtime of the program. This clone behaves similarly to the
original sprite but operates independently.
Examples