WEBVTT 00:00:03.700 --> 00:00:05.600 I was in 8th grade when I learned to program. 00:00:05.700 --> 00:00:07.000 I first learned how to make a 00:00:07.000 --> 00:00:10.500 green circle and a red square appear on the screen. 00:00:10.700 --> 00:00:13.400 You just learn these lessons, and there aren't that many of them, 00:00:13.400 --> 00:00:16.400 and you just eventually can get to the point where you can do almost anything that you want. 00:00:17.700 --> 00:00:22.330 Computer science is just learning how a computer works and how it thinks, 00:00:22.330 --> 00:00:24.700 so that you can teach it to do new things. 00:00:24.800 --> 00:00:28.100 These days what you can do in computer science is pretty much amazing. 00:00:28.200 --> 00:00:31.200 I think it's the closest thing we have to a super power. 00:00:31.300 --> 00:00:34.200 (Tanya: Computer Science student) In the next hour we're going to play a game 00:00:34.200 --> 00:00:36.000 that will teach you the basic concepts of programming. 00:00:36.000 --> 00:00:39.500 Usually programming is all in text but we'll use Blockly, 00:00:39.600 --> 00:00:43.200 which uses visual blocks that you drag and drop to write programs. 00:00:43.200 --> 00:00:46.000 Under the hood you're still creating code. 00:00:46.000 --> 00:00:49.400 To start off we're going to build code for a program that will help 00:00:49.400 --> 00:00:54.000 this angry bird move through a maze to get to the evil pig that stole its eggs. 00:00:54.000 --> 00:00:56.600 Blockly is split into three main parts. 00:00:56.600 --> 00:01:00.000 On the left is the bird's maze where your program will run. 00:01:00.000 --> 00:01:04.000 The instructions for each level are written below the maze. 00:01:04.000 --> 00:01:06.000 This middle area is the tool box, 00:01:06.000 --> 00:01:10.200 and each of these blocks is a command that the bird can understand. 00:01:10.200 --> 00:01:13.000 The white space on the right is called the workspace 00:01:13.000 --> 00:01:15.100 and this is where we'll build our program. 00:01:15.100 --> 00:01:21.000 If I drag the "move" block to our workspace and press "run", what happens? 00:01:21.000 --> 00:01:23.500 The bird moves forward one box on the grid. 00:01:23.500 --> 00:01:28.000 And what if I want the bird to do something after the move forward on one box? 00:01:28.000 --> 00:01:30.300 I can add another block to our program. 00:01:30.300 --> 00:01:33.900 I'm going to choose the "turn right" block and I'll drag it underneath 00:01:33.900 --> 00:01:37.000 my "move" block until the yellow arrow appears 00:01:37.000 --> 00:01:41.000 and then I'll drop it and the two blocks will snap together. 00:01:41.000 --> 00:01:45.000 When I press "run" again, the bird will perform the commands that are stacked, 00:01:45.000 --> 00:01:47.000 from top to bottom, on our workspace. 00:01:47.000 --> 00:01:49.000 If you ever want to delete a block, 00:01:49.000 --> 00:01:52.000 just remove it from the stack and drag it to the trash can. 00:01:52.000 --> 00:01:57.800 After you've hit "run", you can always hit the "reset" button to get the bird back to the start. 00:01:57.800 --> 00:01:59.500 Now, let's get those pigs!