SIZ Approved Course | Visual Programming for Kids and Beginners using Scratch | Lesson 1 | Introduction to Scratch

in Steem Infinity Zone3 years ago (edited)


10% of the payout will be in @siz-official 's wallet

Welcome Steemians


This is the first in 4 lessons in basic programming that will guide beginners through the basic structures of coding. It is all about visual learning and does NOT include any lines of code. This course is great for kids to get familiar with the flow of programming without getting bored with code. As well as for adults who might not be sure if programming is for them or not.

image.png


Divider 1.png

Tools Required:

  • A laptop or PC
  • Any Web Browser (Chrome, Edge, Firefox, Safari, etc.)

Divider 2.png

Lesson 1: Introduction to Scratch

Scratch is a visual programming language that allows you to perform most of the basic programming tasks you would do in an actual written programming language. You do not need to install a program to use scratch. Simply click here and start programming. All without having to write a single line of code. It has many different components which can be chained together to make programs. These components are divided into a few categories. Let us go through the ones we'll be discussing today one by one.


Divider 2.png

1. Motion

These components allow your character, which we call "sprite", to move around in various ways. Try clicking one of the components and see how the default sprite "cat" moves around the screen.

2. Looks

These components will be used to change the appearance of your on-screen sprites. But we will mostly use this category to make our character say different lines and interact with us through text.

3. Sound

The name makes it obvious that we will use these components to play different sounds from our sprites. You can even record your own voice (if you have a microphone on your laptop/PC). The sprite will play it back for you when we program it later on.


4. Events

This one gets a bit technical so bear with me. These components are used as signals at the start of a program. It signals to the program that when this event occurs, start running the program. For example, the first Event you see is "when 🚩 clicked", if it is placed at the beginning of our program, that program will start running as soon as you click the flag.


Those are the component categories we will be using today. The more advanced ones will be explored in later lessons. For now, these are enough for us to make our first Scratch program.


Divider 2.png

The Work Space:


image.png

Any component we select can be clicked to get the desired effect. But to make use of these components in a program, we must drag and drop them in our workspace.

Go to the Motion category and drag and drop the "move 10 steps" component to the workspace, it will permanently stay there until you drag and drop it out of the workspace. Now if you click on it, the cat will move 10 steps to the right. Similarly, we can bring more components to the workplace and we can manipulate their placement to build our program.

Divider 2.png

Stacking Components Together:

We can combine multiple components together and they will be performed in sequence i.e. one after the other when we click on the whole stack.

Go to the Looks category and drag the "say Hello for 2 seconds" component to the workspace. Now separately, the two components on our workspace can be clicked to get their own effect. But if we stack one on top of each other, we get a stack. Drag the purple component and place it underneath the blue component. Now click on the whole stack. You will see that the cat will move 10 steps to the right and then say "Hello" for 2 seconds. Now go to the Sound category and drag the "play sound Meow until done" component to the workspace and stack it underneath our previous stack. Now when you click on the stack, the cat will move 10 steps, then say hello for 2 seconds, and then say meow. You can click on this stack multiple times and it will repeat the programmed blocks in sequence.

Divider 2.png

Building Our First Program:

We are actually very close to finishing our first program. Already, we have programmed the cat to move 10 steps, say hello, and make a "meow" sound. But to actually make it a program, we have to attach it to an event at the beginning. So that the program knows it should start when this event is triggered, rather than having to click on each stack.

Go to the Events tab and select an event on which you want the program to run. You can select a keypress but the most simple is the "when 🚩 clicked" event. Drag it to the very top of your already made stack and voila! Our first program is complete, but wait, it is tradition for a programmer's first program to say "Hello, world!". So, in our workspace's purple Looks block that says "say Hello for 2 seconds", change "Hello" to "Hello, world!". This step is optional but my job was to let you know about the tradition. It's completely up to you to follow it or not.

Divider 2.png

Running Your First Program:

Now that we have made our first program, we will trigger the event that we placed on top to run it. In our case, we placed the "when 🚩 clicked" event. So, we will click the green flag at the top right of our workspace.

Divider 2.png

Congratulations

You have successfully built and run your first-ever Scratch Visual Program. It was fun right? Play around with these components and discover ways you can manipulate today's commands to have more fun with programming.

Divider 2.png

Thank you all for reading my first lesson for SIZ Approved IT courses. Hope you learned something from it. Feel free to ask me any questions down in the replies and suggest ways I can improve my lessons. And stay tuned for the next lesson

Divider 2.png

GOOD BYE

Thank you for any and all support from the SIZ community.
Mentioned especially,

@cryptokraze
@siz-official
@vvarishayy
@suboohi
@arie.steem

Footer.png

Discord
Twitter
Facebook

Sort:  
 3 years ago 

Good one Post dear friend you make a very good post keep it up bro and keep learn with our steem fellows and friends.

Regards, Faran Nabeel

Coin Marketplace

STEEM 0.18
TRX 0.13
JST 0.029
BTC 58157.69
ETH 3122.82
USDT 1.00
SBD 2.42