☰ Contents · Computing

The Scratch programming environment

Lessons 27 · 1 lessons · D.T. Kamaltdinova, D.M. Sayfurov. Informatics and Information Technology, Grade 5 (general editor F.M. Zakirova). “Nashriyot uyi Tasvir”, Tashkent, 2020
27

The Scratch programming environment

Textbook: pp. 85–90
GoalExplain algorithm, executor and program; know the main parts of the Scratch window (stage, sprite, blocks, script) and start and stop a program.
New words
a clear sequence of steps for an executor · algoritmsprite: a character or object in a Scratch project · spraytscript: blocks snapped together in order · skriptstage: the area where the project runs · sahna (Stage)
Explanation

An algorithm is a clear sequence of commands for an executor to carry out. The executor can be a person, robot, machine or computer. An algorithm can be written as text, a formula, a flowchart or a program. A program is a sequence of commands written in a language the computer understands, and programming languages are the special languages programs are written in. Scratch is a free visual programming environment for children and beginners (created by a team at MIT): you do not type code, you snap coloured blocks together like puzzle pieces. The Scratch window has a blocks palette (categories by colour: Motion, Looks, Sound, Events, Control, Sensing, Operators, Variables), a script area, the stage and the sprites pane. There are tabs: Code, Costumes and Sounds. The stage is 480 wide and 360 high: the x axis runs from –240 to 240, the y axis from –180 to 180, and the centre is (0, 0). A program starts with the green flag and stops with the red stop button. When joining the online Scratch community, sign up with the help of a teacher or an adult and do not use your real name or personal details.

Worked examples
An algorithm for making tea: 1) pour water into a kettle; 2) boil it; 3) add tea; 4) wait a few minutes; 5) pour into a cup. If the order changes, the result is spoiled. (Handle hot water only with an adult!)
The stage is 480 units wide. A sprite going from the left edge (x = –240) to the right edge (x = 240) travels 240 – (–240) = 480 units.
Class activity

“Robot pupil”: one pupil is the executor (robot); the class gives step-by-step orders (“3 steps forward”, “turn right”) to guide them past obstacles. If an order is unclear, the robot says “I don’t understand”.

Practice
1
What is an algorithm and who can be its executor?
2
What are the size of the Scratch stage and the coordinates of its centre?
3
Which buttons start and stop a program?
4
Why are there fewer typing mistakes in Scratch?