< Return to Video

Hour of Code - Chris Bosh teaches Repeat Until statements - audio fixed

  • 0:00 - 0:03
    Every athlete knows that you get good by practicing,
  • 0:03 - 0:07
    by repeating the same moves until you get really good,
    or until you reach your goal.
  • 0:07 - 0:09
    When I was in high school,
  • 0:09 - 0:12
    I wouldn't leave practice until I made 10 free throws in a row.
  • 0:12 - 0:16
    Similarly, when you get to a computer program and repeat a command
  • 0:16 - 0:19
    you can give it an exact number of times to repeat,
  • 0:19 - 0:21
    or you can define a goal,
  • 0:21 - 0:25
    and tell it to repeat the command until it reaches some goal.
  • 0:25 - 0:29
    In the next example, the "repeat" block is changed,
  • 0:29 - 0:32
    instead of specifying how many times you want it to repeat
  • 0:32 - 0:37
    you can use the "repeat until" block
    to tell the angry bird to do the same thing
  • 0:37 - 0:40
    until it gets the pig or until it crashes into a wall.
  • 0:40 - 0:44
    And again, we can put multiple blocks inside the loop
    and repeat a series of actions.
Title:
Hour of Code - Chris Bosh teaches Repeat Until statements - audio fixed
Video Language:
English
Team:
Code.org
Project:
CSF '21-'22
Duration:
0:51

English subtitles

Revisions