LearnX Community
Digital Cafe@Harbourfront
Seniors can Code
Date: 8th July 2023
Time: 2PM to 5PM
Venue: library@harbourfront (Vivo City)
Facilitator: Hewlee Ho
What is Scratch Coding?
Scratch Coding is the easiest programming language specifically designed for 8 to 14 years old (for kids around the world), but it is use by people of all ages including primary & junior school students and seniors. this Scratch programming software is made available free online or offline by MIT Media Lab. We can use this programming language to create stories, music, karaoke songs, games and art.
Coding is a computer language to tell the computer what to do. Scratch coding is one of the computer language available in computer programming.
Scratch coding is a visual way (like placing LEGO blocks one on top of another) to create interactive animation, games, music/art and presentations like telling a digital story or even creating a karaoke song.
Scratch coding is one of the means to be creative and logical in thinking, which encompasses play, imagination, create, share and reflect (what went wrong or can I do it better). To be a creator or maker of things rather (always) is a consumer.
What is required to learn Scratch Coding?
You need to create a scratch account via https://scratch.mit.edu. Don’t be too serious with creating this scratch account. Don’t use your Chinese name or complicated password. Here you are in a “Children’s” platform – no money is involved.
What you need to know about the Scratch program before you can create
– Backdrop (or stage) together with the Backdrop Pane
– Sprites (or characters) together with the Sprite Pane
– Costumes Pane
– Sound Pane
– A space on the right (Scrips area) to store all your programming statements (the LEGO or Code blocks)
– The left space is your stage or final output of your Scratch project
– The Green flag (on the top bar) is to start running the program, you have created, by clicking with the mouse
– The red button (on the top bar) is to stop the program when click
The Sprites contain many sub-folders including the following which come with colours and shapes:
– Motion
– Looks
– Sound
– Pen
– Data
– Events
– Control
– Sensing
– Operations
– More Blocks
Backpack
Backpack is the space below the Scripts area where you can store some of the useful sets of commands for future Projects. To copy and store them, just drag the set to the Backpack area. To remove any stored sets, just left click the mouse together with the Shift key, then delete.
How to navigate and use the Scratch Program?
1) To select a backdrop – click the bottom left of the Scratch main page, the “screen” icon. If you import backdrop from external, recommended size is 480 x 360 pixel.
2) To select a new Sprite – click the Sprite icon just beside the words “New Sprite”. You can obtain more information of your Sprite by clicking the “i” at the corner.
3) Learn how to import new backdrops and Sprites from external sources
4) Learn how to delete the unwanted default Sprite (the Cat)
5) Within each Sprite, you can create any interactive sequence and action with the wide range of possibilities as stated above.
6) Location of every Sprite within the Backdrop is defined by coordinates (x,y) with the Center (0,0). The horizontal (x) is from -240 (left corner) to 240 (right corner). The vertical (y) is from 180 (top) to -180 (bottom).
7) Don’t forget to give a unique project name to every Scratch program created. Just change the word “Untitled” to any appropriate name acceptable, you can click “share” and when the program turns to the next page, put a simple comment in the Comment space, like “How is my Project?” and follow by clicking “Post”.
8) After you have completed the Scratch program, tested and find it acceptable, you can click “”share” and when the. program turns to the next page, put a simple comment in the Comment space, like “How is my project?” and follow by clicking “Post”
9) To find you Project number – first open up your Scratch Project, then lightly left click the URL (web address) bar, a set of numbers will shoe up – this is the Project Number relating to the Scratch project you have created.
10) We can also see all the Scratch projects you have posted, if we know your username of your Scratch account.
11) To increase or reduce the coding area, click the small arrow at the bottom right of the stage corner
12) To write a standalone comment, you can right click in the Script and select “comment”. You can also minimise the comment by clicking the arrow on the top left-hand corner.
13) To write a block comment, do the same as (12) above, but tag it accordingly to the block set.
Sprites Interactions
– Motion
To request the Sprite (or Character) to move forward, backard, glide, point, turn, go to (x,y), etc.
– Looks
To request the Sprite (or Character) to say, change costume, change size, change color, change/switch backdrop, etc.
– Sound
To request the Sprite (or Character) to play a sound/song, change volume, pause x seconds, set instrument to, play a note, etc. Please do not confuse this sound related to the Sprite (or Character) to the overall Sound Folder, which is the sound bite available within the Scratch program
– Pen
This “tool” is to draw lines with size, color, shape, appear (show) or to disappear (hide).
– Data
To make a “variable” or to make a “list”. For example, to measure a “score” or to change “speed”.
– Events
To start a program, to initiate another Sprite (or Character) to start, etc. Useful for synchronisation and coordination among Sprites (or Characters).
– Control
Covers all logical statements like repeat, forever, if – then -, if – then – else, wait, stop, etc.
– Sensing
Covers touching, when certain keyboard key is touch, etc.
– Operations
Covers computations (+, -, *, /), logical statements, like and, or & not, etc.
– More Blocks
You can make (or define) your own Block (or loops) but can only use it on the same Sprite (or Character). This is useful for reducing the number of coding statements (or LEGO blocks) if you can identify identical sets of instructions within the same Sprite. A loop causes the commands contained within to repeat one or more times.
Project No.1 (To create/draw a House)
This exercise reinforces the understanding of coordinates and movement of a point or an object, like a Sprite (or Character). In this case, the “Sprite” or tool is the “pen”.
You can view the completed Project No.1 via link https://scratch.mit.edu/projects/846395335/editor.
Project No.2 Animation (To introduce a Name like “Max”)
The name “Max” is introduced, one letter at a time – starting from the top right-hand corner. Then it travels down, rotate 360 degrees and finally landed on the base.
You can view the completed Project No.1 via link https://scratch.mit.edu/projects/326869061/editor.
Project No.3 (To create a fish tank with fishes)
Put a few fishes in the tank and let then swim freely (left to right) & (right to left). Generate some air bubbles.
You can view the completed Project No.1 via link https://scratch.mit.edu/projects/337620371/editor.