Lesson 1, Topic 1
In Progress

Repeat () Block

repeat () Block

Blocks inside the repeat block will loop a given amount of times, before allowing the script to continue. If a decimal is an input, the number is rounded up.repeat ()

E.g. you can make a script to make Tobi recite a table of a number that the user gives him. You know what? Let’s make it!

Table counting

Activity: Tobi Reciting Table

  1.  Add an ask () and wait block to get the number whose table the user wants Tobi to recite.Counting a Table
  2. Make a variable and set it to 0.
  3. Add a repeat block and write 10 in its space as we want Tobi to say from 1 to 10.Counting a Table
  4. Add a change () by () block to increment the value each time the repeat block is called.
  5. Next, make Tobi recite the table by using the blocks shown in the script below.
  6. Finally, add a when flag clicked block above the entire script.Counting a TableTable counting

forever Block

Blocks inside the forever block will run in a loop just like the repeat () block except that the loop never ends. Since the loop is infinite, the block has no bump at the bottom; having a bump would be pointless, as the blocks below it would never be activated.forever block

Assignment

Before you move on to the next lesson, a small assignment awaits you!

You must upload the PictoBlox program you wrote in the activity to the website.

Submitting the assignment is a must in order to receive the certificate after completing the course.

Follow the steps below to upload your assignment:

  1. Click on Choose File.
  2. Select the image from the pop-up window that opens up.
  3. Once the image is selected, click on Upload Assignment.
evive Alert
File types allowed is SB3 file generated from the Scratch program. The maximum file size allowed is 5 MB.

Good luck!

Get in Touch!