HKICO_Scratch_ver3
HKICO_Scratch_ver3
- 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
1.
2.
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.
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.
1.
2.
Exercises
Wait until…………
1.
A clone is an exact copy of a sprite which inherits also all the scripts. This is
useful if you want to create multiple sprites which have similar behavior.
There are 3 clone-related blocks:
A hat block to start as a clone
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
8. About blocks: Motion, Events, Operators, Sensing, Control
9. Details in Motion (set rotation, x position)
10. Details in Events
11. Repeat unit, forever, Repeat
12. Conditional selection
13. Broadcast
14. Variable
15. About clone