Learn Scratch Coding With Examples

Learn Scratch Coding With Examples

Have you always wanted to help your child learn to code with Scratch, but weren’t sure where to start? Don’t worry, we are here to help. At Create & Learn, we aim to make coding understandable and fun for all students.

Today, we’ll walk you through the basics of getting started coding Scratch, including how to set up your free account. We’ll also share what the different types of blocks are, and how to put them together to create something great, like fun projects with Scratch, and how to create new Scratch projects from ideas with the help of AI.

Learn Scratch coding with hands-on expert guidance by enrolling your child in the award-winning Scratch classes: Scratch Ninja (grades 2-5); Scratch Junior (grades K-2); Accelerated Scratch (grades 5-9) – designed by professionals from Google, Stanford, and MIT. Start with a free 60 minute Scratch class!



Learn How to Use Scratch

First we’ll answer some frequently asked questions about Scratch coding. Later we’ll reveal some fun projects to try!

What is initial coding?

Scratch is a free block-based coding platform that allows you to create your own games, stories, and animations. In Scratch, you can program various types of projects, such as Magic Pen, Wizard Tag Game, Geometry Dash, Basketball Game, Pacman, or Snake. Scratch is designed for students ages 8-16, but can be used by anyone.

Initial code

Scratch CODE is an online studio where anyone can add any project they create with Scratch. You can also explore projects shared by other kids, and can even comment on them.

How to learn coding with Scratch?

Here we will start learning Scratch coding in a few simple steps. You can also follow our YouTube videos.

1. Start a new project

To code in Scratch, first go to the Scratch page at MIT. Next, click the “create” button to create a new project. You should have a screen that looks like this:

https://www.create-learn.us/topic/scratch

2. Drag the code block

The code block is on the left side of the screen. To create the code, click and drag the block into the large central space. In the beginning, characters and objects were called “sprites”. You can add or remove as many sprites as you want. Every time you add a sprite, it will appear on the stage.

3. Click on the sprite to code it

Click on each sprite to code that particular sprite. There are hundreds of fun sprites to choose from. Whether it’s a soccer player, a butterfly, or a ballerina, our students on the Scratch Ninja course never cease to amaze us with their creative choices and storylines.

https://www.create-learn.us/topic/scratch

To create code, you can drag code blocks from the left side and connect them together. Each sprite, as well as its background, will have its own code.

These blocks can make sprites move, make sounds, and change color. And when connected together they form a series of actions for building games, animations and other projects.

4. Watch your code run

Once you have coded your project, you can click the Green Flag to see your code run in Stage.

If you want to save or share your project, make sure it is saved to your account. If you already have an account, click “Sign in.” If you need to create an account, click “Join Scratch” and follow the instructions (make sure you have a parent with you!).

How to do Scratch programming with basic coding blocks

There are many different types of blocks in Scratch and we are always excited to find out which blocks are our students’ favorites.

Notice how most of the blocks are shaped with special curves at the top and bottom; this is so they can connect together! Here are some of the most important blocks:

Event blocks in Scratch

This yellow block has a special shape, with a bulge at the top. These blocks are “starting blocks”, meaning they must be at the top of every piece of code we create. They tell us when the code will run.

How it works: Run the code when the green flag is clicked (when the program starts). Often, we use this block

How it works: Execute code when a button is pressed. Use the dropdown menu to choose which key you want!

How it works: Execute code when a sprite is clicked.

Scratch the motion block

These blue blocks allow your sprite to move, rotate, and slide.

How it works: This block lets you move your sprite. It will move in the direction your sprite is facing.

How it works: This block lets you rotate the sprite right or left.

How it works: This block allows your sprite to “jump” to a position. You can click on the drop-down menu to see the different options!

How it works: This block allows your sprite to slide smoothly across the screen to the position you choose.

How it works: This block lets you adjust the direction your sprite is facing.

Try combining motion blocks with event blocks to see what happens!

Looks blocky

These purple blocks change the appearance of your sprite.

How it works: These blocks change the size of your sprites.

How it works: These blocks will change the color of your sprite. Use the dropdown menu to see other fun effects!

How it works: This block will create a speech or thought bubble for your sprite, with text in the code block.

Loops – Control the flow of your Scratch code

These blocks are found in the “control” section, colored orange. Like event blocks, they also have special shapes. Loops allow continuous execution and repetition.

Scratch forever blocks

How it works: A forever loop will continue to run code, as long as your program runs. Note that the forever loop does not have a notch at the bottom. This is because the loop will keep running forever, so nothing additional below it will run!

Scratch repeated blocks

How it works: An iterative loop lets you specify how many times you want to run the code.

Sounds – Blocks to enable “talking” sprites and more

This section allows you to add sound to your program. Each sprite has a different sound, but you can also add your own sounds from the “sounds tab”. For example, make a sprite of your dog barking or record some sounds to make it “talk.”

Start sound blocks in Scratch coding for kids

How it works: This block will start playing sound. Any code blocks below will be executed when your sound is played.

Play sound blocks in Scratch coding for kids

How it works: Will play the sound until it finishes. Any code block below this block will be executed once the sound is complete.

Explore initial code examples & tutorials

Scratch is a great program from MIT that can help kids learn to code. However, the program can be a little confusing at first, so it can be helpful for kids to complete simple projects as they learn the ins and outs of the platform. Therefore, we’ve put together some fun Scratch code examples and tutorials for kids that will help them master Scratch and be equipped to tackle more advanced projects in the future.

1. Fun beginner Scratch practice

Discover fun challenges involving flying, changing colors, noise and more! Solve the problem with a step-by-step guide.

2. Beginner Scratch Challenge

Try five beginner Scratch challenges that cover more advanced concepts like loops, variables, and Scratch extensions. Read on to discover fun challenges including translators and story-based games!

3. Make a Mario game in Scratch

In this tutorial, you will learn how to make a Mario game in Scratch. Super Mario Bros., released in 1985, is arguably one of the most popular video games of all time, and is the poster child of not only the entire Mario franchise, but, to a certain degree, Nintendo as a whole. Super Mario Bros. belongs to a very popular arcade game genre: Side-Scrolling Platformer.

4. How to make a road crossing game in Scratch

Find out how to make an easy Cross the Road game in Scratch. In this game, the goal is to get your character across a busy street without getting hit. If you make it to the other side unscathed, you win!

5. Create a maze in Scratch

See how to make a maze in Scratch with this free tutorial. We’ll start at the beginning and demonstrate how to create your own maze, control the character’s escape from the maze with the arrow keys, and even customize the maze with different themes.

Try more Scratch coding projects.

Create new Scratch projects with the help of AI

One of the biggest challenges for kids who love Scratch coding is turning their high-level creative ideas into real projects, as this process requires not only advanced coding knowledge but also problem-solving and executive planning skills. Our Scratch Project Generator, powered by advanced AI, is an engaging tool designed to help students bring their ideas to life. It helps flesh out project ideas, provides step-by-step guidance, offers sample code, and even creates custom images to enhance their projects. Whether your child is developing a game, animation or interactive story, the generator supports them every step of the way. It’s a great way to develop problem-solving skills, build coding confidence, and enjoy a creative, hands-on learning experience.

See examples of project outlines created by other students, then partner with AI to create new Scratch projects based on your own ideas!

That’s how you learn to code with Scratch

And that’s all! Initial coding is fun and easy. There are endless possibilities for your child to get creative with Scratch. Your child can learn beyond the basics in our award-winning Scratch coding course. There’s even a free introductory course so there’s no risk in trying it out.

Next, learn how to make a ball bounce in Scratch and how to make a clicker game.

Brought to you by Carolyn Qu, Instructor at Create & Learn.

Game Online

Gaming Hub

Game online adalah jenis permainan video yang dimainkan melalui jaringan internet. Game ini memungkinkan pemain untuk berinteraksi dengan pemain lain secara real-time, baik itu dalam bentuk kerja sama, kompetisi, atau eksplorasi dunia virtual bersama-sama.