Return to Video

Hour of Code - Introduction

  • 0:04 - 0:06
    I was in 8th grade when I learned to program.
  • 0:06 - 0:07
    I first learned how to make a
  • 0:07 - 0:10
    green circle and a red square appear on the screen.
  • 0:11 - 0:13
    You just learn these lessons, and there aren't that many of them,
  • 0:13 - 0:16
    and you just eventually can get to the point
    where you can do almost anything that you want.
  • 0:18 - 0:22
    Computer science is just learning
    how a computer works and how it thinks,
  • 0:22 - 0:25
    so that you can teach it to do new things.
  • 0:25 - 0:28
    These days what you can do in computer science
    is pretty much amazing.
  • 0:28 - 0:31
    I think it's the closest thing we have to a super power.
  • 0:31 - 0:34
    (Tanya: Computer Science student) In the next hour we're going to play a game
  • 0:34 - 0:36
    that will teach you the basic concepts of programming.
  • 0:36 - 0:40
    Usually programming is all in text but we'll use Blockly,
  • 0:40 - 0:43
    which uses visual blocks that you drag and drop to write programs.
  • 0:43 - 0:46
    Under the hood you're still creating code.
  • 0:46 - 0:49
    To start off we're going to build code for a program that will help
  • 0:49 - 0:54
    this angry bird move through a maze to get to
    the evil pig that stole its eggs.
  • 0:54 - 0:57
    Blockly is split into three main parts.
  • 0:57 - 1:00
    On the left is the bird's maze where your program will run.
  • 1:00 - 1:04
    The instructions for each level are written below the maze.
  • 1:04 - 1:06
    This middle area is the tool box,
  • 1:06 - 1:10
    and each of these blocks is a
    command that the bird can understand.
  • 1:10 - 1:13
    The white space on the right is called the workspace
  • 1:13 - 1:15
    and this is where we'll build our program.
  • 1:15 - 1:21
    If I drag the "move" block to our workspace and press "run",
    what happens?
  • 1:21 - 1:24
    The bird moves forward one box on the grid.
  • 1:24 - 1:28
    And what if I want the bird to do something
    after the move forward on one box?
  • 1:28 - 1:30
    I can add another block to our program.
  • 1:30 - 1:34
    I'm going to choose the "turn right" block and I'll drag it underneath
  • 1:34 - 1:37
    my "move" block until the yellow arrow appears
  • 1:37 - 1:41
    and then I'll drop it and the two blocks will snap together.
  • 1:41 - 1:45
    When I press "run" again,
    the bird will perform the commands that are stacked,
  • 1:45 - 1:47
    from top to bottom, on our workspace.
  • 1:47 - 1:49
    If you ever want to delete a block,
  • 1:49 - 1:52
    just remove it from the stack and drag it to the trash can.
  • 1:52 - 1:58
    After you've hit "run", you can always hit the
    "reset" button to get the bird back to the start.
  • 1:58 - 2:00
    Now, let's get those pigs!
Title:
Hour of Code - Introduction
Video Language:
English
Duration:
02:02

English subtitles

Revisions