< Return to Video

Repeat Blocks: Course A-B

  • 0:06 - 0:14
    This is a repeat block. The code inside a
    repeat block will repeat, or "loop" as many
  • 0:14 - 0:15
    times as you'd like.
  • 0:15 - 0:19
    In puzzles with loops, code that looks like this, works
  • 0:19 - 0:22
    exactly the same as code like this.
  • 0:22 - 0:25
    When you see the same blocks repeated over
  • 0:25 - 0:27
    and over many times in a row, like this,
  • 0:27 - 0:30
    that's a clue that you could make your
  • 0:30 - 0:34
    code shorter by moving the repeated
    section into a repeat block.
  • 0:34 - 0:36
    Now let's give it a try!
Title:
Repeat Blocks: Course A-B
Description:

more » « less
Video Language:
English
Team:
Code.org
Project:
CSF '21-'22
Duration:
01:05

English subtitles

Revisions Compare revisions