Hour of Code – Introduction

Alphabets Sounds Video

share us on:

In this lesson, students are introduced to programming through a fun and interactive game using Blockly, a visual programming tool that allows them to create code by dragging and dropping blocks. They will help a bird navigate a maze to retrieve its eggs, learning the basics of coding by snapping together commands and running their programs. This engaging approach emphasizes that programming is not only about writing text but also about problem-solving and creativity, making it feel like a superpower.

Hour of Code – Introduction

When I was in 8th grade, I discovered the world of programming. My first project was simple: I learned how to make a green circle and a red square appear on a computer screen. These small steps were part of a bigger journey, and soon I realized that with programming, you can create almost anything you imagine. Computer science is all about understanding how computers work and how they process information, so you can teach them to do new and exciting things. Today, the possibilities in computer science are truly incredible, and it feels like having a superpower!

Learning Through Games

In the next hour, we’re going to dive into a fun game that will teach you the basics of programming. Normally, programming involves writing text, but we’ll be using Blockly. Blockly is a tool that lets you create programs by dragging and dropping visual blocks. Even though it looks like a game, you’re actually writing real code behind the scenes!

Getting Started with Blockly

Our first task is to help a bird navigate through a maze to reach a pig that has taken its eggs. Blockly is divided into three main sections:

The Maze

On the left side, you’ll see the bird’s maze. This is where your program will run, and you’ll see the bird move according to the commands you give it.

The Toolbox

In the middle, there’s a toolbox filled with blocks. Each block represents a command that the bird can understand, like moving forward or turning.

The Workspace

On the right, there’s a white space called the workspace. This is where you’ll build your program by snapping blocks together.

Creating Your First Program

Let’s start by dragging the “move” block to the workspace. When you press “run,” the bird will move forward one space on the grid. Want the bird to do more? Add another block! Try dragging the “turn right” block underneath the “move” block until they snap together. Now, when you press “run,” the bird will follow the commands from top to bottom.

Editing and Resetting

If you need to remove a block, just drag it away from the stack and drop it into the trash can. After running your program, you can always press the “reset” button to bring the bird back to the start. Now, let’s help the bird get those pigs!

With Blockly, learning to code is like solving a puzzle. Each block you add is a piece of the solution. Have fun exploring and creating your own programs!

  1. Reflect on your first experience with programming. How did it compare to the author’s experience of creating a green circle and a red square?
  2. What do you think makes programming feel like a “superpower,” as described in the article?
  3. How does the use of visual tools like Blockly change your perception of learning to code compared to traditional text-based programming?
  4. In what ways do you think games can enhance the learning process, especially in fields like computer science?
  5. Consider the structure of Blockly with its maze, toolbox, and workspace. How does this setup help in understanding the logic behind programming?
  6. What challenges do you anticipate when creating your first program using Blockly, and how might you overcome them?
  7. How does the process of editing and resetting in Blockly reflect real-world problem-solving and debugging in programming?
  8. What are some creative projects you would like to explore using programming, and how might tools like Blockly help you achieve them?
  1. Blockly Maze Challenge

    Try to guide the bird through a more complex maze using Blockly. Experiment with different block combinations to find the most efficient path. Can you solve the maze using the fewest blocks possible?

  2. Create Your Own Maze

    Design a maze for your classmates to solve. Use graph paper to sketch your maze and write down the sequence of Blockly commands needed to navigate it. Swap mazes with a friend and see if they can solve yours!

  3. Blockly Storytelling

    Use Blockly to create a simple animated story. Choose characters and actions, and sequence them using blocks to tell a short story. Share your story with the class and explain the code behind it.

  4. Debugging Detective

    Work in pairs to solve a series of Blockly puzzles that contain errors. Your task is to find and fix the mistakes in the code so the bird can successfully reach the pig. Discuss the errors and solutions with your partner.

  5. Blockly Art Project

    Use Blockly to create a piece of digital art. Experiment with different shapes and colors by combining blocks in creative ways. Present your artwork to the class and describe the process you used to create it.

Sure! Here’s a sanitized version of the transcript:

I was in 8th grade when I learned to program. I first learned how to make a green circle and a red square appear on the screen. You learn these lessons, and there aren’t that many of them, and eventually, you can reach a point where you can do almost anything you want. Computer science is about understanding how a computer works and how it processes information, so you can teach it to perform new tasks. These days, the possibilities in computer science are truly amazing. I think it’s the closest thing we have to a superpower.

In the next hour, we’re going to play a game that will teach you the basic concepts of programming. Usually, programming is done in text, but we’ll use Blockly, which utilizes visual blocks that you can drag and drop to create programs. Under the hood, you’re still generating code.

To start off, we’re going to build code for a program that will help a bird navigate through a maze to reach the pig that took its eggs. Blockly is divided into three main parts. On the left is the bird’s maze where your program will run. The instructions for each level are written below the maze. The middle area is the toolbox, and each of these blocks represents a command that the bird can understand. The white space on the right is called the workspace, and this is where we’ll construct our program.

If I drag the “move” block to our workspace and press “run,” what happens? The bird moves forward one box on the grid. And what if I want the bird to do something after moving forward? I can add another block to our program. I’ll choose the “turn right” block and drag it underneath my “move” block until the yellow arrow appears, then drop it so the two blocks snap together. When I press “run” again, the bird will execute the commands stacked from top to bottom in our workspace.

If you ever want to delete a block, just remove it from the stack and drag it to the trash can. After you’ve pressed “run,” you can always hit the “reset” button to return the bird to the start. Now, let’s get those pigs!

Let me know if you need any further modifications!

ProgrammingThe process of creating a set of instructions that tell a computer how to perform a task. – Example sentence: In programming class, we learned how to write code to make a game.

ComputerAn electronic device that can store, retrieve, and process data according to instructions given to it. – Example sentence: I used my computer to complete my homework and play educational games.

CodeA set of instructions written in a programming language that a computer can understand and execute. – Example sentence: We wrote code in Python to create a simple calculator program.

BlocklyA visual programming language that allows users to create code by stacking blocks together. – Example sentence: Using Blockly, I was able to create a fun animation without typing any code.

MazeA complex network of paths or passages, often used in coding games to teach problem-solving skills. – Example sentence: In the coding game, I had to write instructions to help the robot navigate through the maze.

ToolboxA collection of blocks or tools in a visual programming environment that can be used to build programs. – Example sentence: I dragged blocks from the toolbox to the workspace to create my program.

WorkspaceThe area in a coding environment where you can arrange and connect blocks to build a program. – Example sentence: My workspace was filled with colorful blocks that formed the code for my project.

RunTo execute a program or a set of instructions on a computer. – Example sentence: After finishing my code, I clicked the run button to see if my program worked correctly.

MoveA command in programming that instructs an object or character to change its position. – Example sentence: I used the move block to make the character walk forward in the game.

BirdA character or object often used in coding exercises to teach movement and logic. – Example sentence: In the coding challenge, I programmed the bird to fly through the obstacles to reach its nest.

All Video Lessons

Login your account

Please login your account to get started.

Don't have an account?

Register your account

Please sign up your account to get started.

Already have an account?