< Return to Video

Minecraft Hour of Code - Repeat Loops

  • 0:04 - 0:08
    Stampy: I wonder what Stacy is up to?
  • 0:13 - 0:17
    Stacy: Woah, I think I'm in the right place.
  • 0:17 - 0:19
    This is amazing!
  • 0:19 - 0:22
    I feel like I'm back in Minecraft!
  • 0:22 - 0:24
    Hello.
  • 0:24 - 0:25
    How are you?
  • 0:25 - 0:27
    Hello?
  • 0:27 - 0:31
    Oh, there's a creeper. You don't do anything, do you?
  • 0:31 - 0:31
    Katie: Stacy?
  • 0:31 - 0:32
    Stacy:Hi, Katie?
  • 0:32 - 0:33
    Katie: Yes!
  • 0:33 - 0:34
    Welcome to Minecraft.
  • 0:34 - 0:35
    Stacy: Thank you!
  • 0:35 - 0:37
    Katie: Come on in!
  • 0:38 - 0:40
    Stacy: This is amazing.
  • 0:40 - 0:43
    So you work here every day as a developer,
    right?
  • 0:43 - 0:44
    Katie: Yeah, it's pretty awesome.
  • 0:44 - 0:47
    I'm a developer on the Minecraft marketplace
    team.
  • 0:47 - 0:49
    Stacy: How many coding languages do you know?
  • 0:49 - 0:52
    Katie: In my career I've probably worked with
    over a dozen.
  • 0:52 - 0:53
    Stacy: A dozen?
  • 0:53 - 0:54
    Katie: Yeah.
  • 0:54 - 0:58
    Stacy: So now, you wouldn't happen to know
    anything about this little golem guy that
  • 0:58 - 0:59
    calls himself "the Agent"?
  • 0:59 - 1:06
    Katie: We use the Agent to do things that
    Steve or Alex can't, like go across lava.
  • 1:06 - 1:10
    Stacy: Well, I want to learn how to code,
    and they want to learn how to code, so what
  • 1:10 - 1:13
    is one of the first things that you need to
    know when you're learning?
  • 1:13 - 1:16
    Katie: Well, you need to learn how to use
    loops.
  • 1:16 - 1:17
    Stacy: Ok.
  • 1:17 - 1:21
    Katie: Loops are things that developers write
    to give commands to a computer that can be
  • 1:21 - 1:22
    run over and over again.
  • 1:22 - 1:26
    Stacy: Got it, so I think there's actually
    some of that coming up in the levels ahead,
  • 1:26 - 1:29
    so go ahead and give loops a try.
  • 1:29 - 1:33
    In the next level, you can use a loop to move
    the Agent along the path.
  • 1:33 - 1:38
    Drag the repeat block into the workspace and
    place the move forward block inside the repeat
  • 1:38 - 1:39
    block.
  • 1:39 - 1:44
    This tells the computer to do the same thing
    many times in a row without having to drag
  • 1:44 - 1:46
    a whole bunch of blocks into the workspace.
  • 1:46 - 1:51
    You can choose how many times to repeat by
    putting a number in the repeat block.
  • 1:51 - 1:56
    You can put turns and multiple commands in
    the repeat block too, but for now try using
  • 1:56 - 1:59
    a repeat to move the Agent forward a few steps.
  • 1:59 - 2:03
    Remember, if you get stuck on a puzzle you
    can always hit the blue "reset" button and
  • 2:03 - 2:04
    try again.
  • 2:04 - 2:09
    If you are thinking about having a cool job
    like Katie's, go ahead and click the "show
  • 2:09 - 2:11
    code" button when you finish every level.
  • 2:11 - 2:15
    That's going to actually show you the Javascript
    code that someone like Katie uses when she's
  • 2:15 - 2:17
    actually programming Minecraft.
  • 2:17 - 2:18
    So anyway, thank you so much!
  • 2:18 - 2:20
    Katie: Yeah, good luck everyone!
Title:
Minecraft Hour of Code - Repeat Loops
Description:

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

English subtitles

Revisions