{"id":46804,"date":"2022-02-11T10:44:00","date_gmt":"2022-02-11T16:44:00","guid":{"rendered":"https:\/\/www.codewizardshq.com\/?p=46804"},"modified":"2025-04-22T01:04:39","modified_gmt":"2025-04-22T07:04:39","slug":"scratch-code-examples","status":"publish","type":"post","link":"https:\/\/www.codewizardshq.com\/scratch-code-examples\/","title":{"rendered":"Scratch Code Examples: Learn Scratch Programming"},"content":{"rendered":"\n<p><strong>Scratch is a simple, fun coding platform<\/strong> <strong>designed especially for kids. <\/strong>We teach Scratch in our <a href=\"https:\/\/www.codewizardshq.com\/coding-classes-elementary-school-students\/\" target=\"_blank\" rel=\"noreferrer noopener\">elementary school coding program<\/a>, but even adults can enjoy coding with Scratch. The Scratch platform does a pretty good job of making it easy to jump into coding, but even the simplest programs are intimidating for someone who is just getting started. It&#8217;s helpful to see Scratch code examples and try them out for yourselves. After all, it\u2019s a brand-new interface with buttons, blocks, and more.&nbsp;<\/p>\n\n\n<p style=\"background: none repeat scroll 0 0 #ecf3f6; clear: both; margin-bottom: 18px; overflow: hidden; border: 1px solid #011e41; padding: 16px;\"><span>\ud83d\udccc<\/span><small><strong> [Download] Printable Scratch Coding Tutorials <\/strong> Get 2 printable Scratch tutorials, Rocket Landing and Flying Space Cat, to code your own games step by step. <a href=\"#download\">Download Now<\/a><\/small><\/p>\n\n\n\n<p><strong>We\u2019re going to take a look at different Scratch code examples and what they do, but first, what is Scratch and why should you care?&nbsp;<\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-learn-programming-in-scratch\">Learn Programming in Scratch<\/h2>\n\n\n\n<p><a href=\"https:\/\/scratch.mit.edu\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Scratch<\/strong><\/a><strong> is a free platform for learning how to code. <\/strong>It\u2019s popular, in large part, because MIT put a <em>ton <\/em>of work into making Scratch programming language easy to understand and use. It&#8217;s a <a href=\"https:\/\/www.codewizardshq.com\/what-is-block-coding\/\">block-based coding language<\/a> and allows users to drag and drop colorful blocks of code to build animations or games.&nbsp;<\/p>\n\n\n\n<p><strong>While the way learners interact with the code is simplified, the code itself is not. Each block represents a chunk of real code, which means kids are learning real coding concepts when they work in Scratch. <\/strong>As such, Scratch is a great platform for teaching your child coding concepts like conditionals and loops, exploring how (X,Y) coordinates work, or what exactly an \u201cevent\u201d is in coding.&nbsp;<\/p>\n\n\n\n<p>If that sounds interesting, you can also check out our <a href=\"https:\/\/www.codewizardshq.com\/scratch-coding-classes\/\">Scratch coding classes for kids<\/a>!<\/p>\n\n\n\n<p><strong><em>Recommended:&nbsp;<\/em><\/strong><a href=\"https:\/\/www.codewizardshq.com\/coding-websites-for-kids\/\"><em>Kids Coding Websites<\/em><\/a><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"620\" height=\"323\" src=\"https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2022\/02\/two_kids_in_scratch_class.jpg\" alt=\"Young boy and girl in scratch class\" class=\"wp-image-46877\" style=\"width:700px;height:365px\" srcset=\"https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2022\/02\/two_kids_in_scratch_class.jpg 620w, https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2022\/02\/two_kids_in_scratch_class-300x156.jpg 300w\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" \/><\/figure><\/div>\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-scratch-code-examples-for-beginners\">Scratch Code Examples for Beginners<\/h2>\n\n\n\n<p>Scratch builds complete programs by connecting a series of code blocks together. Each block represents a piece of real code inside that users can string together to make things happen. In a Scratch program, different kinds of blocks have different colors and names that tell you the type of block it is and what job it does.&nbsp;<\/p>\n\n\n\n<p><strong>Let\u2019s take a look at a few Scratch code examples.<\/strong> These are some of the most common blocks in beginner Scratch programs and what they do.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Event blocks<\/li>\n\n\n\n<li>Motion blocks<\/li>\n\n\n\n<li>Looks Blocks<\/li>\n\n\n\n<li>Sound Blocks<\/li>\n\n\n\n<li>Control Blocks<\/li>\n<\/ul>\n\n\n\n<p>You can also see how these example blocks work together to build a complete project, like our<a href=\"https:\/\/www.codewizardshq.com\/scratch-coding-for-kids-valentines-card-2021\/\"> Scratch Valentine\u2019s Day tutorial<\/a>.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"593\" src=\"https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2022\/02\/Code-Blocks-Example-1024x593.png\" alt=\"example of scratch code blocks\" class=\"wp-image-46867\" style=\"width:750px;height:434px\" srcset=\"https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2022\/02\/Code-Blocks-Example-1024x593.png 1024w, https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2022\/02\/Code-Blocks-Example-300x174.png 300w, https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2022\/02\/Code-Blocks-Example-768x445.png 768w, https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2022\/02\/Code-Blocks-Example.png 1328w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-event-blocks\"><strong>Event Blocks<\/strong><\/h3>\n\n\n\n<p>The orange blocks in Scratch, usually with a rounded top, are event blocks.&nbsp;<\/p>\n\n\n\n<p>In most cases, the event blocks are the ones that begin each sequence of code. They usually can\u2019t be added below other blocks on a chain. Their job is to wait for a specific event to happen or send a message to other blocks so they can tell the code blocks below them to go!&nbsp;<\/p>\n\n\n\n<p>Scratch code blocks that aren\u2019t attached to an event block won\u2019t run, so event blocks are a necessary part of every program.&nbsp;<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><strong>When Green Flag Clicked<\/strong><\/p>\n\n\n\n<p>The \u201cWhen Green Flag Clicked\u201d event block starts a chain of code when the green flag button is clicked. This is commonly used as a way to start the code for an animation or game that doesn\u2019t need other interaction from the person playing it. Essentially, it\u2019s a start button to get your code going!<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"460\" height=\"112\" src=\"https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2022\/02\/scratch_block_flag.png\" alt=\"Scratch block flag\" class=\"wp-image-46847\" srcset=\"https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2022\/02\/scratch_block_flag.png 460w, https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2022\/02\/scratch_block_flag-300x73.png 300w\" sizes=\"auto, (max-width: 460px) 100vw, 460px\" \/><\/figure>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><strong>When Key Pressed<\/strong><\/p>\n\n\n\n<p>The \u201cWhen Key Pressed\u201d event block starts a section of code when a specific key is pressed on the keyboard. It\u2019s useful for when you want something to happen when the user presses a key, like getting a sprite (a character or image) to move around. &nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"462\" height=\"103\" src=\"https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2022\/02\/scratch_block_pressed.jpg\" alt=\"Scratch block pressed\" class=\"wp-image-46846\" srcset=\"https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2022\/02\/scratch_block_pressed.jpg 462w, https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2022\/02\/scratch_block_pressed-300x67.jpg 300w\" sizes=\"auto, (max-width: 462px) 100vw, 462px\" \/><\/figure>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><strong>When This Sprite Clicked<\/strong><\/p>\n\n\n\n<p>In Scratch programming, sprites are elements and characters in your project. The \u201cwhen this sprite clicked\u201d event block starts the code when the user clicks on the chosen sprite. This is useful for any Scratch game that involves collecting items by clicking on them or for letting users click on buttons using the mouse. On touchscreens, a click event happens when the user taps on the sprite with their finger.&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"463\" height=\"109\" src=\"https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2022\/02\/scratch_block_clicked.jpg\" alt=\"Scratch block clicked\" class=\"wp-image-46845\" srcset=\"https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2022\/02\/scratch_block_clicked.jpg 463w, https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2022\/02\/scratch_block_clicked-300x71.jpg 300w\" sizes=\"auto, (max-width: 463px) 100vw, 463px\" \/><\/figure>\n\n\n\n<div style=\"height:40px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-motion-blocks\"><strong>Motion Blocks<\/strong><\/h3>\n\n\n\n<p>The motion blocks are the blue blocks. These are the blocks that control the movement of the different sprites in your program. Any time you want a sprite to change its position on the screen, these are the blocks that you\u2019ll add.<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><strong>Move<\/strong><\/p>\n\n\n\n<p>The \u201cmove\u201d block is the most basic of the motion blocks. When activated, it will move its sprite the indicated number of steps in the direction the sprite is facing. So, if you wanted to move your sprite 10 steps to the right, you would make sure it is facing 90\u00b0 (the right side of the screen) and activate the move block.<\/p>\n\n\n\n<p>The white circles inside these blocks have numbers that you can change so you can move the sprite the specific distance that you want.&nbsp;<br><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"436\" height=\"94\" src=\"https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2022\/02\/scratch_block_move.jpg\" alt=\"Scratch code move\" class=\"wp-image-46844\" srcset=\"https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2022\/02\/scratch_block_move.jpg 436w, https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2022\/02\/scratch_block_move-300x65.jpg 300w\" sizes=\"auto, (max-width: 436px) 100vw, 436px\" \/><\/figure>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><strong>Turn<\/strong><\/p>\n\n\n\n<p>The \u201cturn\u201d blocks change the direction your sprite is facing by the number of degrees shown in the white circle. In a maze game, your sprite might need to turn 90\u00b0 to travel the right path. Remember that the direction a sprite is facing affects the direction that the \u201cmove\u201d block takes it.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"457\" height=\"178\" src=\"https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2022\/02\/scratch_block_turn.jpg\" alt=\"Scratch code turn\" class=\"wp-image-46843\" srcset=\"https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2022\/02\/scratch_block_turn.jpg 457w, https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2022\/02\/scratch_block_turn-300x117.jpg 300w\" sizes=\"auto, (max-width: 457px) 100vw, 457px\" \/><\/figure>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><strong>Go to&nbsp;<\/strong><\/p>\n\n\n\n<p>The \u201cgo to\u201d block will instantly move its sprite to the coordinates shown in its circles.&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"439\" height=\"88\" src=\"https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2022\/02\/scratch_block_goto.jpg\" alt=\"Scratch code go to\" class=\"wp-image-46842\" srcset=\"https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2022\/02\/scratch_block_goto.jpg 439w, https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2022\/02\/scratch_block_goto-300x60.jpg 300w\" sizes=\"auto, (max-width: 439px) 100vw, 439px\" \/><\/figure>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><strong>Glide<\/strong><\/p>\n\n\n\n<p>The \u201cglide\u201d block will also take its sprite to the set coordinates but will do it over a number of seconds instead of doing it instantly. This is useful if you want to show the movement instead of just moving the sprite instantaneously.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"445\" height=\"88\" src=\"https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2022\/02\/scratch_block_glide.jpg\" alt=\"Scratch code glide\" class=\"wp-image-46841\" srcset=\"https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2022\/02\/scratch_block_glide.jpg 445w, https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2022\/02\/scratch_block_glide-300x59.jpg 300w\" sizes=\"auto, (max-width: 445px) 100vw, 445px\" \/><\/figure>\n\n\n\n<div style=\"height:40px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-looks-blocks\"><strong>Looks Blocks<\/strong><\/h3>\n\n\n\n<p>Looks blocks affect how sprites and backgrounds appear to the user. This is great for making sprites look like they are moving or for changing the scenery in animations. Changing the looks of a block is a separate task from changing its position. If you want to make a sprite appear to be walking, you&#8217;ll need to activate both a motion block <em>and <\/em>a looks block.<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><strong>Switch Costume<\/strong><\/p>\n\n\n\n<p>Changing the looks of a sprite is done by switching between costumes. Costumes are different pictures that are all connected to a single sprite. When the \u201cswitch costume\u201d block is activated, its sprite will change to the specific costume shown in the dropdown menu.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"436\" height=\"94\" src=\"https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2022\/02\/scratch_block_switchcostume.jpg\" alt=\"Scratch code example costume\" class=\"wp-image-46840\" srcset=\"https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2022\/02\/scratch_block_switchcostume.jpg 436w, https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2022\/02\/scratch_block_switchcostume-300x65.jpg 300w\" sizes=\"auto, (max-width: 436px) 100vw, 436px\" \/><\/figure>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><strong>Switch Backdrop<\/strong><\/p>\n\n\n\n<p>Changing the looks of the scenery is done by switching between backdrops. When the \u201cswitch backdrop\u201d block is activated, the picture used as the background will change to the backdrop indicated in the dropdown.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"445\" height=\"85\" src=\"https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2022\/02\/scratch_block_switchbackdrop.jpg\" alt=\"Scratch code example backdrop\" class=\"wp-image-46839\" srcset=\"https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2022\/02\/scratch_block_switchbackdrop.jpg 445w, https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2022\/02\/scratch_block_switchbackdrop-300x57.jpg 300w\" sizes=\"auto, (max-width: 445px) 100vw, 445px\" \/><\/figure>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><strong>Show and Hide<\/strong><\/p>\n\n\n\n<p>The show and hide blocks affect the visibility of sprites. If there is a sprite that you don\u2019t want visible on the screen, the \u201chide\u201d block can make it invisible, but still a part of your program. Likewise, if there is an invisible sprite on the screen that you want to make visible, the \u201cshow\u201d block will make it visible.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"433\" height=\"175\" src=\"https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2022\/02\/scratch_block_showhide.jpg\" alt=\"Scratch code example show and hide\" class=\"wp-image-46838\" srcset=\"https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2022\/02\/scratch_block_showhide.jpg 433w, https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2022\/02\/scratch_block_showhide-300x121.jpg 300w\" sizes=\"auto, (max-width: 433px) 100vw, 433px\" \/><\/figure>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-sound-blocks\"><strong>Sound Blocks<\/strong><\/h3>\n\n\n\n<p>Sound blocks are blocks that affect the audio playing instead of anything visual. You can choose specific sound files included on Scratch, upload your own files, or even record directly in the program if you like.&nbsp;<\/p>\n\n\n\n<p>Of the three most commonly used sound blocks, two will play your chosen sound file, but there\u2019s a major difference between them.<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><strong>Play Sound Until Done<\/strong><\/p>\n\n\n\n<p>The \u201cplay sound until done\u201d block will play the file until it finishes before activating the next block. This keeps sounds from overlapping each other, which could make any dialogue difficult to understand. It\u2019s also useful if you want a sprite to finish saying what he\u2019s saying before moving.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"448\" height=\"88\" src=\"https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2022\/02\/scratch_block_playsound.jpg\" alt=\"Scratch code example sound\" class=\"wp-image-46837\" srcset=\"https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2022\/02\/scratch_block_playsound.jpg 448w, https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2022\/02\/scratch_block_playsound-300x59.jpg 300w\" sizes=\"auto, (max-width: 448px) 100vw, 448px\" \/><\/figure>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><strong>Start Sound<\/strong><\/p>\n\n\n\n<p>In contrast, the \u201cstart sound\u201d block will play a sound, but will also instantly activate the next block in line. This is useful if you want to stack sounds on top of each other, or activate another block while the sound is playing.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"442\" height=\"85\" src=\"https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2022\/02\/scratch_block_startsound.jpg\" alt=\"Scratch code example start sound\" class=\"wp-image-46836\" srcset=\"https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2022\/02\/scratch_block_startsound.jpg 442w, https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2022\/02\/scratch_block_startsound-300x58.jpg 300w\" sizes=\"auto, (max-width: 442px) 100vw, 442px\" \/><\/figure>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><strong>Stop All Sounds<\/strong><\/p>\n\n\n\n<p>The \u201cstop all sounds\u201d button does just what it says. When this block is activated, it will stop all sounds from playing. Note that this doesn\u2019t pause or mute them, it stops them from playing. That means that sound files will start over from the beginning if they are activated again.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"436\" height=\"88\" src=\"https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2022\/02\/scratch_block_stopsound.jpg\" alt=\"Scratch code example stop sound\" class=\"wp-image-46835\" srcset=\"https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2022\/02\/scratch_block_stopsound.jpg 436w, https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2022\/02\/scratch_block_stopsound-300x61.jpg 300w\" sizes=\"auto, (max-width: 436px) 100vw, 436px\" \/><\/figure>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-control-blocks\"><strong>Control Blocks<\/strong><\/h3>\n\n\n\n<p>Control blocks don\u2019t directly affect sprites, backdrops, <em>or <\/em>audio. Instead, they control when and how often other blocks get activated. That gives you the ability to code loops, add in delays, and generally increase the amount of control you have over your code.<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><strong>Wait<\/strong><\/p>\n\n\n\n<p>The \u201cwait\u201d block keeps code blocks from activating directly after the block ahead of them. This is useful for making sure block actions happen exactly when you intend them to.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"445\" height=\"87\" src=\"https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2022\/02\/scratch_block_wait.jpg\" alt=\"scratch block wait\" class=\"wp-image-46834\" srcset=\"https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2022\/02\/scratch_block_wait.jpg 445w, https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2022\/02\/scratch_block_wait-300x59.jpg 300w\" sizes=\"auto, (max-width: 445px) 100vw, 445px\" \/><\/figure>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><strong>Repeat<\/strong><\/p>\n\n\n\n<p>\u201cRepeat\u201d blocks are used to create code loops. When a \u201crepeat\u201d block is activated, it will repeat whatever other blocks it contains for the specified number of times before activating any block underneath. This helps a <em>ton<\/em> in keeping the overall length of code down and helps in avoiding small mistakes in repeating code.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"438\" height=\"162\" src=\"https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2022\/02\/scratch_block_repeat.jpg\" alt=\"Scratch block repeat\" class=\"wp-image-46849\" srcset=\"https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2022\/02\/scratch_block_repeat.jpg 438w, https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2022\/02\/scratch_block_repeat-300x111.jpg 300w\" sizes=\"auto, (max-width: 438px) 100vw, 438px\" \/><\/figure>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><strong>Forever<\/strong><\/p>\n\n\n\n<p>The \u201cforever\u201d block is a special loop block that will continue activating whatever blocks it contains until it is made to stop. This is especially useful for things like creating background music or other actions that you don\u2019t want to stop.&nbsp;&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"433\" height=\"148\" src=\"https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2022\/02\/scratch_block_forever.jpg\" alt=\"Scratch block forever\" class=\"wp-image-46848\" srcset=\"https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2022\/02\/scratch_block_forever.jpg 433w, https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2022\/02\/scratch_block_forever-300x103.jpg 300w\" sizes=\"auto, (max-width: 433px) 100vw, 433px\" \/><\/figure>\n\n\n<p style=\"background: none repeat scroll 0 0 #ecf3f6; clear: both; margin-bottom: 18px; overflow: hidden; border: 1px solid #011e41; padding: 16px;\"><span class=\"ttfmake-icon mceNonEditable fa\">\ud83d\udcbb<\/span><small><strong> Scratch classes for kids ages 8-10.<\/strong> Learn Scratch with fun and enagaging, live coding classes. <a href=\"https:\/\/www.codewizardshq.com\/coding-classes-elementary-school-students\/\">View Elementary School Program.<\/a><\/small><\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-scratch-game-amp-app-tutorials\"><strong><strong>Scratch Game &amp; App Tutorials<\/strong><\/strong><\/h2>\n\n\n\n<p>Learn how to create a simple game or application with these free projects. Find full Scratch code examples in our programming tutorials.<\/p>\n\n\n<div class=\"secondary-blog-posts\"><div class=\"row\"><div class=\"col col-12 col-md-6\"><a href=\"https:\/\/www.codewizardshq.com\/how-to-make-a-maze-in-scratch-in-7-steps\/\"><span class=\"image\" style=\"background-image:url('https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2024\/11\/How-to-code-a-maze-page-banner.png');\"><span class=\"label\" style=\"background:rgba(182,62,68,.8)\">Learn Coding<\/span><\/span><div class=\"text\"><h3 class=\"title\"><span>How to Make a Maze in Scratch in 7 steps<\/span><\/h3><span class=\"date\">Updated on June 2, 2025<\/span><\/div><\/a><\/div><div class=\"col col-12 col-md-6\"><a href=\"https:\/\/www.codewizardshq.com\/how-to-make-flappy-bird-on-scratch\/\"><span class=\"image\" style=\"background-image:url('https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2023\/04\/01-Flappy-Bird-on-Scratch-1600x395-1.jpg');\"><span class=\"label\" style=\"background:rgba(182,62,68,.8)\">Learn Coding<\/span><\/span><div class=\"text\"><h3 class=\"title\"><span>How to Make Flappy Bird on Scratch<\/span><\/h3><span class=\"date\">Updated on June 2, 2025<\/span><\/div><\/a><\/div><div class=\"col col-12 col-md-6\"><a href=\"https:\/\/www.codewizardshq.com\/scratch-tutorial-for-kids-flying-space-cat\/\"><span class=\"image\" style=\"background-image:url('https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2022\/11\/flying-space-cat-page-banner.png');\"><span class=\"label\" style=\"background:rgba(182,62,68,.8)\">Learn Coding<\/span><\/span><div class=\"text\"><h3 class=\"title\"><span>Scratch Tutorial For Kids: Flying Space Cat<\/span><\/h3><span class=\"date\">Updated on April 22, 2025<\/span><\/div><\/a><\/div><div class=\"col col-12 col-md-6\"><a href=\"https:\/\/www.codewizardshq.com\/scratch-tutorial-for-kids\/\"><span class=\"image\" style=\"background-image:url('https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2022\/10\/01-Rocket-Landing-1600x395-1.jpg');\"><span class=\"label\" style=\"background:rgba(182,62,68,.8)\">Learn Coding<\/span><\/span><div class=\"text\"><h3 class=\"title\"><span>Simple Scratch Tutorial for Kids: Code a Rocket Landing Game<\/span><\/h3><span class=\"date\">Updated on June 2, 2025<\/span><\/div><\/a><\/div><\/div><\/div>\n\n\n\n<div style=\"height:40px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"download\">Download Free Printable Scratch Coding Tutorials PDF<\/h2>\n\n\n\n<p>Get the Rocketship Landing game and Flying Space Cat Scratch tutorials in a printable format.<\/p>\n\n\n<!-- This site is converting visitors into subscribers and customers with OptinMonster - https:\/\/optinmonster.com :: Campaign Title: Scratch Coding Tutorials with Location [Download] -->\n<div id=\"om-i88ehlfzgijqlvmuilzg-holder\"><\/div>\n<script>(function(d,u,ac){var s=d.createElement('script');s.type='text\/javascript';s.src='https:\/\/a.omappapi.com\/app\/js\/api.min.js';s.async=true;s.dataset.user=u;s.dataset.campaign=ac;d.getElementsByTagName('head')[0].appendChild(s);})(document,16320,'i88ehlfzgijqlvmuilzg');<\/script>\n<!-- \/ OptinMonster -->\n\n\n\n<div style=\"height:40px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-make-games-amp-apps-in-scratch\"><strong><strong>Make Games &amp; Apps in Scratch<\/strong><\/strong><\/h2>\n\n\n\n<p>Now that you have the hang of the basic kinds of Scratch blocks, it\u2019s time to put them to use!&nbsp;<\/p>\n\n\n\n<p>Everything you can make in Scratch is created through combinations of the different kinds of blocks, and there is no better way to learn than by jumping in and trying it out yourself. But if you\u2019re interested in getting a head start on learning, be sure to check out CodeWizardsHQ\u2019s <a href=\"https:\/\/www.codewizardshq.com\/coding-classes-elementary-school-students\/\">Scratch coding classes<\/a>.&nbsp;<\/p>\n\n\n\n<p>Good luck and happy Scratching!<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Scratch is a simple, fun coding platform designed especially for kids. We teach Scratch in our elementary school coding program, but even adults can enjoy coding with Scratch. The Scratch platform does a pretty good job of making it easy to jump into coding, but even the simplest programs are intimidating for someone who is [&hellip;]<\/p>\n","protected":false},"author":276,"featured_media":46808,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"om_disable_all_campaigns":false,"inline_featured_image":false,"_lmt_disableupdate":"yes","_lmt_disable":"","footnotes":""},"categories":[1],"tags":[10740],"class_list":["post-46804","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-scratch"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.8 (Yoast SEO v26.8) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Scratch Code Examples: Learn Scratch Programming<\/title>\n<meta name=\"description\" content=\"Scratch code examples that kids and beginners can use to start coding in Scratch. Learn programming concepts and code games and apps.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.codewizardshq.com\/scratch-code-examples\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Scratch Code Examples: Learn Scratch Programming\" \/>\n<meta property=\"og:description\" content=\"Scratch code examples that kids and beginners can use to start coding in Scratch. Learn programming concepts and code games and apps.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.codewizardshq.com\/scratch-code-examples\/\" \/>\n<meta property=\"og:site_name\" content=\"CodeWizardsHQ\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/codewizardshq\/\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/neverendingfieldtrip\" \/>\n<meta property=\"article:published_time\" content=\"2022-02-11T16:44:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-04-22T07:04:39+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2022\/02\/02-Scratch-Code-600x323-1.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"600\" \/>\n\t<meta property=\"og:image:height\" content=\"323\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Jacob Smith\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@NeverendingFT\" \/>\n<meta name=\"twitter:site\" content=\"@codewizardshq\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jacob Smith\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"11 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\n\t    \"@context\": \"https:\/\/schema.org\",\n\t    \"@graph\": [\n\t        {\n\t            \"@type\": \"Article\",\n\t            \"@id\": \"https:\/\/www.codewizardshq.com\/scratch-code-examples\/#article\",\n\t            \"isPartOf\": {\n\t                \"@id\": \"https:\/\/www.codewizardshq.com\/scratch-code-examples\/\"\n\t            },\n\t            \"author\": {\n\t                \"name\": \"Jacob Smith\",\n\t                \"@id\": \"https:\/\/www.codewizardshq.com\/#\/schema\/person\/c7a6fcfdfcc98972f8c9fda475d8aa11\"\n\t            },\n\t            \"headline\": \"Scratch Code Examples: Learn Scratch Programming\",\n\t            \"datePublished\": \"2022-02-11T16:44:00+00:00\",\n\t            \"dateModified\": \"2025-04-22T07:04:39+00:00\",\n\t            \"mainEntityOfPage\": {\n\t                \"@id\": \"https:\/\/www.codewizardshq.com\/scratch-code-examples\/\"\n\t            },\n\t            \"wordCount\": 1699,\n\t            \"publisher\": {\n\t                \"@id\": \"https:\/\/www.codewizardshq.com\/#organization\"\n\t            },\n\t            \"image\": {\n\t                \"@id\": \"https:\/\/www.codewizardshq.com\/scratch-code-examples\/#primaryimage\"\n\t            },\n\t            \"thumbnailUrl\": \"https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2022\/02\/01-Scratch-Code-1600x395-1.jpg\",\n\t            \"keywords\": [\n\t                \"Scratch\"\n\t            ],\n\t            \"inLanguage\": \"en-US\"\n\t        },\n\t        {\n\t            \"@type\": \"WebPage\",\n\t            \"@id\": \"https:\/\/www.codewizardshq.com\/scratch-code-examples\/\",\n\t            \"url\": \"https:\/\/www.codewizardshq.com\/scratch-code-examples\/\",\n\t            \"name\": \"Scratch Code Examples: Learn Scratch Programming\",\n\t            \"isPartOf\": {\n\t                \"@id\": \"https:\/\/www.codewizardshq.com\/#website\"\n\t            },\n\t            \"primaryImageOfPage\": {\n\t                \"@id\": \"https:\/\/www.codewizardshq.com\/scratch-code-examples\/#primaryimage\"\n\t            },\n\t            \"image\": {\n\t                \"@id\": \"https:\/\/www.codewizardshq.com\/scratch-code-examples\/#primaryimage\"\n\t            },\n\t            \"thumbnailUrl\": \"https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2022\/02\/01-Scratch-Code-1600x395-1.jpg\",\n\t            \"datePublished\": \"2022-02-11T16:44:00+00:00\",\n\t            \"dateModified\": \"2025-04-22T07:04:39+00:00\",\n\t            \"description\": \"Scratch code examples that kids and beginners can use to start coding in Scratch. Learn programming concepts and code games and apps.\",\n\t            \"breadcrumb\": {\n\t                \"@id\": \"https:\/\/www.codewizardshq.com\/scratch-code-examples\/#breadcrumb\"\n\t            },\n\t            \"inLanguage\": \"en-US\",\n\t            \"potentialAction\": [\n\t                {\n\t                    \"@type\": \"ReadAction\",\n\t                    \"target\": [\n\t                        \"https:\/\/www.codewizardshq.com\/scratch-code-examples\/\"\n\t                    ]\n\t                }\n\t            ]\n\t        },\n\t        {\n\t            \"@type\": \"ImageObject\",\n\t            \"inLanguage\": \"en-US\",\n\t            \"@id\": \"https:\/\/www.codewizardshq.com\/scratch-code-examples\/#primaryimage\",\n\t            \"url\": \"https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2022\/02\/01-Scratch-Code-1600x395-1.jpg\",\n\t            \"contentUrl\": \"https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2022\/02\/01-Scratch-Code-1600x395-1.jpg\",\n\t            \"width\": 1600,\n\t            \"height\": 395,\n\t            \"caption\": \"Scratch Code Examples Page Banner\"\n\t        },\n\t        {\n\t            \"@type\": \"BreadcrumbList\",\n\t            \"@id\": \"https:\/\/www.codewizardshq.com\/scratch-code-examples\/#breadcrumb\",\n\t            \"itemListElement\": [\n\t                {\n\t                    \"@type\": \"ListItem\",\n\t                    \"position\": 1,\n\t                    \"name\": \"Home\",\n\t                    \"item\": \"https:\/\/www.codewizardshq.com\/\"\n\t                },\n\t                {\n\t                    \"@type\": \"ListItem\",\n\t                    \"position\": 2,\n\t                    \"name\": \"Scratch Code Examples: Learn Scratch Programming\"\n\t                }\n\t            ]\n\t        },\n\t        {\n\t            \"@type\": \"WebSite\",\n\t            \"@id\": \"https:\/\/www.codewizardshq.com\/#website\",\n\t            \"url\": \"https:\/\/www.codewizardshq.com\/\",\n\t            \"name\": \"CodeWizardsHQ\",\n\t            \"description\": \"The leading online coding academy for kids and teens ages 8-18\",\n\t            \"publisher\": {\n\t                \"@id\": \"https:\/\/www.codewizardshq.com\/#organization\"\n\t            },\n\t            \"potentialAction\": [\n\t                {\n\t                    \"@type\": \"SearchAction\",\n\t                    \"target\": {\n\t                        \"@type\": \"EntryPoint\",\n\t                        \"urlTemplate\": \"https:\/\/www.codewizardshq.com\/?s={search_term_string}\"\n\t                    },\n\t                    \"query-input\": {\n\t                        \"@type\": \"PropertyValueSpecification\",\n\t                        \"valueRequired\": true,\n\t                        \"valueName\": \"search_term_string\"\n\t                    }\n\t                }\n\t            ],\n\t            \"inLanguage\": \"en-US\"\n\t        },\n\t        {\n\t            \"@type\": \"Organization\",\n\t            \"@id\": \"https:\/\/www.codewizardshq.com\/#organization\",\n\t            \"name\": \"CodeWizardsHQ\",\n\t            \"url\": \"https:\/\/www.codewizardshq.com\/\",\n\t            \"logo\": {\n\t                \"@type\": \"ImageObject\",\n\t                \"inLanguage\": \"en-US\",\n\t                \"@id\": \"https:\/\/www.codewizardshq.com\/#\/schema\/logo\/image\/\",\n\t                \"url\": \"https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2016\/08\/blueVertical@2x-e1572141901928.png\",\n\t                \"contentUrl\": \"https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2016\/08\/blueVertical@2x-e1572141901928.png\",\n\t                \"width\": 150,\n\t                \"height\": 108,\n\t                \"caption\": \"CodeWizardsHQ\"\n\t            },\n\t            \"image\": {\n\t                \"@id\": \"https:\/\/www.codewizardshq.com\/#\/schema\/logo\/image\/\"\n\t            },\n\t            \"sameAs\": [\n\t                \"https:\/\/www.facebook.com\/codewizardshq\/\",\n\t                \"https:\/\/x.com\/codewizardshq\",\n\t                \"https:\/\/www.instagram.com\/codewizardshq\/\",\n\t                \"https:\/\/www.linkedin.com\/company\/codewizardshq\",\n\t                \"https:\/\/www.pinterest.com\/codewizardshq\/\",\n\t                \"https:\/\/www.youtube.com\/channel\/UC4NM0jfN0LI8_vWtiwLqgGw\"\n\t            ]\n\t        },\n\t        {\n\t            \"@type\": \"Person\",\n\t            \"@id\": \"https:\/\/www.codewizardshq.com\/#\/schema\/person\/c7a6fcfdfcc98972f8c9fda475d8aa11\",\n\t            \"name\": \"Jacob Smith\",\n\t            \"image\": {\n\t                \"@type\": \"ImageObject\",\n\t                \"inLanguage\": \"en-US\",\n\t                \"@id\": \"https:\/\/www.codewizardshq.com\/#\/schema\/person\/image\/\",\n\t                \"url\": \"https:\/\/secure.gravatar.com\/avatar\/f6cca08beb80a8dd2fe2c69c49bb591b06fea5b8a17c9399c19a9b12529de5c3?s=96&d=mm&r=g\",\n\t                \"contentUrl\": \"https:\/\/secure.gravatar.com\/avatar\/f6cca08beb80a8dd2fe2c69c49bb591b06fea5b8a17c9399c19a9b12529de5c3?s=96&d=mm&r=g\",\n\t                \"caption\": \"Jacob Smith\"\n\t            },\n\t            \"description\": \"Jacob is an avid traveler, blogger, and homeschool dad, with an interest in pretty much everything. His goal is to inspire kids and parents to explore the world around them, to make connections, and to never stop learning.\",\n\t            \"sameAs\": [\n\t                \"http:\/\/www.neverendingfieldtrip.com\",\n\t                \"https:\/\/www.facebook.com\/neverendingfieldtrip\",\n\t                \"https:\/\/www.instagram.com\/neverendingfieldtrip\/\",\n\t                \"https:\/\/x.com\/NeverendingFT\"\n\t            ],\n\t            \"url\": \"https:\/\/www.codewizardshq.com\/author\/jacobsmith\/\"\n\t        }\n\t    ]\n\t}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Scratch Code Examples: Learn Scratch Programming","description":"Scratch code examples that kids and beginners can use to start coding in Scratch. Learn programming concepts and code games and apps.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.codewizardshq.com\/scratch-code-examples\/","og_locale":"en_US","og_type":"article","og_title":"Scratch Code Examples: Learn Scratch Programming","og_description":"Scratch code examples that kids and beginners can use to start coding in Scratch. Learn programming concepts and code games and apps.","og_url":"https:\/\/www.codewizardshq.com\/scratch-code-examples\/","og_site_name":"CodeWizardsHQ","article_publisher":"https:\/\/www.facebook.com\/codewizardshq\/","article_author":"https:\/\/www.facebook.com\/neverendingfieldtrip","article_published_time":"2022-02-11T16:44:00+00:00","article_modified_time":"2025-04-22T07:04:39+00:00","og_image":[{"width":600,"height":323,"url":"https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2022\/02\/02-Scratch-Code-600x323-1.jpg","type":"image\/jpeg"}],"author":"Jacob Smith","twitter_card":"summary_large_image","twitter_creator":"@NeverendingFT","twitter_site":"@codewizardshq","twitter_misc":{"Written by":"Jacob Smith","Est. reading time":"11 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.codewizardshq.com\/scratch-code-examples\/#article","isPartOf":{"@id":"https:\/\/www.codewizardshq.com\/scratch-code-examples\/"},"author":{"name":"Jacob Smith","@id":"https:\/\/www.codewizardshq.com\/#\/schema\/person\/c7a6fcfdfcc98972f8c9fda475d8aa11"},"headline":"Scratch Code Examples: Learn Scratch Programming","datePublished":"2022-02-11T16:44:00+00:00","dateModified":"2025-04-22T07:04:39+00:00","mainEntityOfPage":{"@id":"https:\/\/www.codewizardshq.com\/scratch-code-examples\/"},"wordCount":1699,"publisher":{"@id":"https:\/\/www.codewizardshq.com\/#organization"},"image":{"@id":"https:\/\/www.codewizardshq.com\/scratch-code-examples\/#primaryimage"},"thumbnailUrl":"https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2022\/02\/01-Scratch-Code-1600x395-1.jpg","keywords":["Scratch"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.codewizardshq.com\/scratch-code-examples\/","url":"https:\/\/www.codewizardshq.com\/scratch-code-examples\/","name":"Scratch Code Examples: Learn Scratch Programming","isPartOf":{"@id":"https:\/\/www.codewizardshq.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.codewizardshq.com\/scratch-code-examples\/#primaryimage"},"image":{"@id":"https:\/\/www.codewizardshq.com\/scratch-code-examples\/#primaryimage"},"thumbnailUrl":"https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2022\/02\/01-Scratch-Code-1600x395-1.jpg","datePublished":"2022-02-11T16:44:00+00:00","dateModified":"2025-04-22T07:04:39+00:00","description":"Scratch code examples that kids and beginners can use to start coding in Scratch. Learn programming concepts and code games and apps.","breadcrumb":{"@id":"https:\/\/www.codewizardshq.com\/scratch-code-examples\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.codewizardshq.com\/scratch-code-examples\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.codewizardshq.com\/scratch-code-examples\/#primaryimage","url":"https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2022\/02\/01-Scratch-Code-1600x395-1.jpg","contentUrl":"https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2022\/02\/01-Scratch-Code-1600x395-1.jpg","width":1600,"height":395,"caption":"Scratch Code Examples Page Banner"},{"@type":"BreadcrumbList","@id":"https:\/\/www.codewizardshq.com\/scratch-code-examples\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.codewizardshq.com\/"},{"@type":"ListItem","position":2,"name":"Scratch Code Examples: Learn Scratch Programming"}]},{"@type":"WebSite","@id":"https:\/\/www.codewizardshq.com\/#website","url":"https:\/\/www.codewizardshq.com\/","name":"CodeWizardsHQ","description":"The leading online coding academy for kids and teens ages 8-18","publisher":{"@id":"https:\/\/www.codewizardshq.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.codewizardshq.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.codewizardshq.com\/#organization","name":"CodeWizardsHQ","url":"https:\/\/www.codewizardshq.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.codewizardshq.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2016\/08\/blueVertical@2x-e1572141901928.png","contentUrl":"https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2016\/08\/blueVertical@2x-e1572141901928.png","width":150,"height":108,"caption":"CodeWizardsHQ"},"image":{"@id":"https:\/\/www.codewizardshq.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/codewizardshq\/","https:\/\/x.com\/codewizardshq","https:\/\/www.instagram.com\/codewizardshq\/","https:\/\/www.linkedin.com\/company\/codewizardshq","https:\/\/www.pinterest.com\/codewizardshq\/","https:\/\/www.youtube.com\/channel\/UC4NM0jfN0LI8_vWtiwLqgGw"]},{"@type":"Person","@id":"https:\/\/www.codewizardshq.com\/#\/schema\/person\/c7a6fcfdfcc98972f8c9fda475d8aa11","name":"Jacob Smith","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.codewizardshq.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/f6cca08beb80a8dd2fe2c69c49bb591b06fea5b8a17c9399c19a9b12529de5c3?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f6cca08beb80a8dd2fe2c69c49bb591b06fea5b8a17c9399c19a9b12529de5c3?s=96&d=mm&r=g","caption":"Jacob Smith"},"description":"Jacob is an avid traveler, blogger, and homeschool dad, with an interest in pretty much everything. His goal is to inspire kids and parents to explore the world around them, to make connections, and to never stop learning.","sameAs":["http:\/\/www.neverendingfieldtrip.com","https:\/\/www.facebook.com\/neverendingfieldtrip","https:\/\/www.instagram.com\/neverendingfieldtrip\/","https:\/\/x.com\/NeverendingFT"],"url":"https:\/\/www.codewizardshq.com\/author\/jacobsmith\/"}]}},"modified_by":"Margaret Choi","featured_image_src":"https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2022\/02\/01-Scratch-Code-1600x395-1-600x395.jpg","featured_image_src_square":"https:\/\/www.codewizardshq.com\/wp-content\/uploads\/2022\/02\/01-Scratch-Code-1600x395-1-600x395.jpg","author_info":{"display_name":"Jacob Smith","author_link":"https:\/\/www.codewizardshq.com\/author\/jacobsmith\/"},"_links":{"self":[{"href":"https:\/\/www.codewizardshq.com\/wp-json\/wp\/v2\/posts\/46804","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.codewizardshq.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.codewizardshq.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.codewizardshq.com\/wp-json\/wp\/v2\/users\/276"}],"replies":[{"embeddable":true,"href":"https:\/\/www.codewizardshq.com\/wp-json\/wp\/v2\/comments?post=46804"}],"version-history":[{"count":6,"href":"https:\/\/www.codewizardshq.com\/wp-json\/wp\/v2\/posts\/46804\/revisions"}],"predecessor-version":[{"id":69045,"href":"https:\/\/www.codewizardshq.com\/wp-json\/wp\/v2\/posts\/46804\/revisions\/69045"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.codewizardshq.com\/wp-json\/wp\/v2\/media\/46808"}],"wp:attachment":[{"href":"https:\/\/www.codewizardshq.com\/wp-json\/wp\/v2\/media?parent=46804"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.codewizardshq.com\/wp-json\/wp\/v2\/categories?post=46804"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.codewizardshq.com\/wp-json\/wp\/v2\/tags?post=46804"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}