Pssst...use your keyboard arrows to turn the page!
Heya coders – welcome back! Now that we’ve mastered step-by-step instructions, we’re ready to start learning how to code our very own projects.
But, well, how do we code our own projects?
We start by coming up with an idea. Say that our idea is to make a cat zoom across our computer screens. That’s a great idea! Now, we have to figure out how to teach our computer programs to make that idea actually happen using step by step instructions.
Step 1: Place the cat on the left side of the screen.
Step 2: Make the cat glide across the screen.
Step 3: Hide the cat from view.
When we write instructions for computers, we write them in something called a programming language. A programming language is just like any other language, but it lets us talk to computers instead of people.
Finally, when we code, we do it inside of apps called code editors.
We’ll be learning how to write code in a programming language called Scratch, and we’ll write our code inside of the Scratch code editor.
Now, let's practice using Scratch together!
Everyone in class should follow along with the next steps on your computers.
Next, in the top blue bar, click "Create" to make a new project.
We can think of the Scratch Editor as one big play. On the right side of the window, we have our Stage. This is where our entire play will take place.
Every play needs a good Backdrop. We can change our backdrops by clicking on this button here. This opens up a library full of background images we can use in our projects. Let’s double click on “Basketball Court” to load it into our project.
Next, a play needs actors to perform in it. In Scratch, our actors are called Sprites. Sprites are any character that will have some role to play in our production. They can appear, disappear, and move around.
Let’s click on this button to open up the Sprite Library Browser. And from here, let’s double click on “Basketball” to load it into our project alongside our cat.
Finally, all good plays need a good script. We give directions to our Sprites using code! In the left column of our Scratch Editor, we have the Block palette. Different types of code blocks are grouped into categories here. We can Bring out the code blocks we want into the code editor, and connect 'em together like LEGOs!
In your code editor, click on the Events tab, then find the block called When green flag clicked.
Next, click on the Motion tab, and find the block that says Move 10 steps
Now, click on the green flag above the stage a few times to see what happens!