How to Use Scratch: Learn Scratch Coding With Examples (2024)

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

Today, we're going to walk you through the basics of beginning Scratch coding, including how to set up your free account. We'll also share what the different types of blocks are, and how to think about putting them together to create something great, such as fun projects with Scratch.

Learn Scratch with live expert guidance by joining our 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 Scratch class!

Learn to How to Use Scratch

First we'll answer a few common questions about Scratch. Later we'll reveal some fun projects to try!

What is Scratch coding?

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

How to Use Scratch: Learn Scratch Coding With Examples (1)

Scratch code

Scratch CODE is an online studio where anyone can add any project they made with Scratch. You're also able to explore projects shared by other kids, and can even comment on them. Another great place to show off your projects once they're complete is our kids coding projects page.

How do I learn to code with Scratch?

Here we'll get started learning Scratch coding in a few simple steps. You can also follow along with our YouTube video.

1. Start a new project

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

How to Use Scratch: Learn Scratch Coding With Examples (2)

2. Drag the code blocks

The code blocks are on the left hand side of the screen. To code, click and drag the blocks to the large center space. On scratch, the characters and objects are called “sprites.” You can add or delete as many sprites as you want. Each time you add a sprite, it will appear on the stage.

3. Click on sprites to code for them

Click on each sprite to code for 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 in our Scratch Ninja course never cease to amaze us with their creative choices and story lines.

How to Use Scratch: Learn Scratch Coding With Examples (3)

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

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

4. Watch your code run

After you’ve coded your project, you can click on the Green Flag to see your code run on the Stage.

If you want to save or share your project, make sure it’s saved under your account. If you already have an account, click “Log In.” If you need to make 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 on Scratch and we're always excited to learn which blocks are our students favorites.

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

Events blocks in Scratch

These yellow colored blocks have a special shape, with the bump at the top. These blocks are “starting blocks,” meaning they must go at the top of any chunk of code we create. They tell us when the code will be run.

How to Use Scratch: Learn Scratch Coding With Examples (4)

How it works: Run the code when the green flag is clicked (when the program begins). Most of the time, we use this block

How to Use Scratch: Learn Scratch Coding With Examples (5)

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

How to Use Scratch: Learn Scratch Coding With Examples (6)

How it works: Run the code when the sprite is clicked.

Scratch motion blocks

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

How to Use Scratch: Learn Scratch Coding With Examples (7)

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

How to Use Scratch: Learn Scratch Coding With Examples (8)

How it works: These blocks allow you to rotate your sprite to the right or to the left.

How to Use Scratch: Learn Scratch Coding With Examples (9)

How it works: This block lets your sprite "jump" to a position. You can click on the dropdown menu to see the different options!

How to Use Scratch: Learn Scratch Coding With Examples (10)

How it works: This block allows your sprite to smoothly glide across your screen to a position of your choosing.

How to Use Scratch: Learn Scratch Coding With Examples (11)

How it works: These blocks allow you to adjust the direction that your sprite is facing.

Try combining a motion block with an event block to see what happens!

Looks blocks

These purple colored blocks change the appearance of your sprite.

How to Use Scratch: Learn Scratch Coding With Examples (12)

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

How to Use Scratch: Learn Scratch Coding With Examples (13)

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

How to Use Scratch: Learn Scratch Coding With Examples (14)

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

Loops - Control the flow of your Scratch code

These blocks are found in the “control” section, colored in orange. Like the events blocks, they also have a special shape. Loops enable the continually run and repeat.

How to Use Scratch: Learn Scratch Coding With Examples (15)

How it works: The forever loop will keep running the code, as long as your program is running. Notice that the forever loop doesn't have a notch at the bottom. This is because the loop will keep running forever, so nothing added under it will run!

How to Use Scratch: Learn Scratch Coding With Examples (16)

How it works: The repeat loop allows you to 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 different sounds, but you can also add your own from the “sounds tab”. For example, get your dog sprite to bark or record some sounds to have it “talk”.

How to Use Scratch: Learn Scratch Coding With Examples (17)

How it works: This block will start playing the sound. Any code blocks under this one will run as your sound is playing.

How to Use Scratch: Learn Scratch Coding With Examples (18)

How it works: Will play the sound until it's finished. Any code blocks under this one will run once the sounds is over.

Explore Scratch code examples & tutorials

Scratch is an incredible program from MIT that can help kids learn how to code. However, the program can be a bit confusing at first, so it is helpful for kids to have simple projects to complete as they learn the ins and outs of the platform. For that reason, we’ve compiled some fun Scratch code examples and tutorials for kids that will help them to master Scratch and be equipped to tackle more advanced projects in the future.

1. Fun beginner Scratch exercises

Find fun challenges that involve flying, changing colors, noises, and more! Solve them with step-by-step guidance.

2. Beginner Scratch challenges

Try your hand at five beginner Scratch challenges that include more sophisticated concepts such as loops, variables, and Scratch extensions. Read on to find fun challenges including a translator and a story-based game!

3. Make a Mario game on Scratch

In this tutorial, you'll 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 the poster child of not only the entire Mario franchise, but, to a degree, Nintendo as a whole. Super Mario Bros belongs to an extremely popular genre of arcade games: the Side-Scrolling Platformer.

4. How to make a cross the road game in Scratch

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

5. Make a maze in Scratch

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

Try even more Scratch coding projects.

That's how you learn to code with Scratch

And that’s it! Scratch coding is fun and easy. There are infinite possibilities for your child to create with Scratch. Your child can learn beyond the basics in our award-winning Scratch coding courses. There's even a free introduction course so there's no risk in trying.

Up next, learn how to make a ball bounce in Scratch or how to make a clicker game.

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

How to Use Scratch: Learn Scratch Coding With Examples (2024)

FAQs

How to learn to code in Scratch? ›

Here are the steps you need to follow to program in Scratch:
  1. Sign up to Scratch. ...
  2. Familiarize yourself with the Scratch platform. ...
  3. Get to know the Scratch programming editor. ...
  4. Create your own characters and objects. ...
  5. Learn Scratch scripts. ...
  6. Add music and background. ...
  7. Publish your project in Scratch.
Jan 2, 2023

Does Scratch actually teach coding? ›

The main purpose of Scratch is to help young learners learn basic coding concepts without getting into the complexities of object-oriented programming or textual coding.

Is Scratch beginner friendly? ›

Does Scratch require any prior programming knowledge? No, Scratch is designed to be beginner-friendly and does not require any prior programming knowledge.

What are the basics of Scratch? ›

There are four main elements of Scratch: the stage, the sprites, the script and the programming palette. These elements can be compared to a play. 1) Stage – similar to the stage in a play. This is where everything will take place.

Where to start with Scratch? ›

Just Getting Started? The Scratch Ideas page is a great place to begin! This page offers a variety of tutorials, guides, coding cards, and projects for kids, families, and educators to start creating with Scratch. Did you know that Scratch is available in more than 70 languages?

How long does it take to learn Scratch? ›

It might take as little as one month for some people, and it might take six months or longer for others. Some children naturally learn more quickly than others, and some utilise better resources, which speeds up their learning. The time a learner spends using Scratch to program determines how far and fast they advance.

Is it hard to learn how to code from Scratch? ›

Learning to code can be difficult to learn, but many factors need to be taken into consideration to determine just how difficult it may be for any individual. But experts who teach coding say that it's more or less a trial-and-error process.

How do I start learning coding from Scratch for free? ›

How to Learn Coding for Free: Utilizing Free Coding Resources
  1. Codecademy: Offers free courses across multiple languages like Python, Java, JavaScript, SQL, and more. ...
  2. Khan Academy: Provides free coding courses for beginners focused on web development basics using HTML, CSS, and JavaScript.
Feb 19, 2024

What are the 3s of Scratch programming? ›

It's important to know that the Scratch interface is divided into three sections: the stage area, block palette and coding area.

Can you code in Scratch without blocks? ›

Without event blocks, the script can't run. These blocks set a triggering moment( For example, Clicking the green flag) that enables the program to run.

What are the disadvantages of using Scratch? ›

What are Scratch's limitations? There are some limitations to Scratch, like that it does not offer a progression to text-based programming languages; it is missing features for advanced coders, and it does not offer an option for making 3D projects.

Should I learn Scratch or Python? ›

Scratch is best suited for creating games, animations, and interactive stories. It's a great way for kids to express their creativity and develop their storytelling skills. Python, on the other hand, can be used for a wider range of projects, such as data analysis, web development, and machine learning.

How to make a game on Scratch step by step? ›

At its core, the process for making a Scratch game can be broken down into 6 main steps:
  1. Write out the steps for your Scratch game.
  2. Make a design for your Scratch game.
  3. Add sprites for images or characters.
  4. Add code to each sprite with blocks.
  5. Add logic using code blocks.
  6. Test your Scratch game and share it with friends!

How do I get started with scratching? ›

  1. Step 1: Choose The Right Equipment. ...
  2. Step 2: Select The Music To Scratch With. ...
  3. Step 3: Consider Using Samples. ...
  4. Step 4: Master Your Crossfader. ...
  5. Step 5: Start With The Baby Scratch. ...
  6. Step 6: Introduce The Scribble Scratch. ...
  7. Step 7: Learn The Drag Scratch. ...
  8. Step 8: Add The Flare Scratch.
Jan 31, 2023

How does Scratch work? ›

Scratch uses block coding. Block coding turns programming into a drag-and-drop process by converting text-based code into visual blocks. Each block performs a different task, similar to a function in code languages. To write a program, kids combine blocks to create animations and games.

References

Top Articles
Latest Posts
Article information

Author: Madonna Wisozk

Last Updated:

Views: 5445

Rating: 4.8 / 5 (68 voted)

Reviews: 91% of readers found this page helpful

Author information

Name: Madonna Wisozk

Birthday: 2001-02-23

Address: 656 Gerhold Summit, Sidneyberg, FL 78179-2512

Phone: +6742282696652

Job: Customer Banking Liaison

Hobby: Flower arranging, Yo-yoing, Tai chi, Rowing, Macrame, Urban exploration, Knife making

Introduction: My name is Madonna Wisozk, I am a attractive, healthy, thoughtful, faithful, open, vivacious, zany person who loves writing and wants to share my knowledge and understanding with you.