Skip to content

Please update your browser


1. Introduzione alle procedure


Hey and welcome to day 7 of Scratch Fashion and Design. Today you will create a program that designs patterns. You’ll be able to test the patterns you create on things like: clothing, furniture, or even wallpaper. In doing this, you’ll learn about the computer science concept: procedures. A “procedure” combines many instructions into one task, or block. The procedure can then be called to run that set of instructions whenever needed. In Scratch, you create procedures by “making a block.”

For example, you could combine a set of instructions into a dance procedure. When this code runs, it runs the glide block, then “calls” the procedure. All of the code for the procedure runs, before moving to the next glide block.

Alternatively, you code this same example without procedures like this. This requires a *lot* more time and effort. Not only that, but look at how much prettier the code looks when you use a procedure. Rather than copying a bunch of code to make the sprite dance, it’s all placed into a procedure that you can call whenever needed.

Procedures allow you to simplify common actions. You can then create code that looks good, is much easier to read, and takes less time to create.

Take a moment now to make sure you are signed in to the cs-first website using the username and password from your passport. If you are *not* signed in, you won’t receive a digital badge for completing this activity, so be sure to sign in!

Today, you will begin with a starter project that has a procedure to assist in your pattern creation. When this video is over, click on the "Pattern Maker" starter project link.

Sign in to Scratch, and click the Remix button. Then, return to this tab and watch the next video where you’ll begin printing your first pattern.

Now it’s your turn!

Avanti arrow_forward
  1. Apri il progetto di partenza.
  2. Esegui il remix del progetto.
  3. Effettua l'accesso a Scratch.