If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

Welcome to our Hour of Code™!

The 'Hour of Code' is a nationwide initiative by Computer Science Education Week and Code.org to introduce millions of students to one hour of computer science and computer programming. Created by Pamela Fox.

Want to join the conversation?

  • ohnoes default style avatar for user Matthew
    How do u make games in KA with coding because I can code but that's only on my Kano coding computer but I just don't get the game making part about coding.
    (46 votes)
    Default Khan Academy avatar avatar for user
    • starky sapling style avatar for user James McKinney
      Much of making a game will come down to being creative with the programming tools you know, and being willing to search out new tools to solve the problems you come across as you try.

      Much of creating a game is not in the coding but in coming up with the idea for the game.

      The best advice I think I can give is this: determine what you want to do in the game then break it up into smaller tasks. create individual programs that tackle each of these tasks and then incorporate the parts back into a larger program.

      for example.I want a top down shooter game where enemies attack from all sides and I want there to be loot that upgrades my character as he progresses through the game. I want to control the characters movement with the keyboard and shoot with the mouse.

      So lets break it down into smaller tasks. I will need to:
      1) Make the program react when I click the mouse
      2) Make the program react when I push a key on the keyboard
      3) Animated a shape on the screen
      4) Make the shape move when I push a key
      5) make enemies that act independently according to rules I outline. like follow a mouse pointer
      6) Add animated objects when the mouse is clicked.
      7) create a collision mechanism the determines when two objects hit one another. to use to check for bullet strikes or a character grabbing upgrades
      8) figure out how to remove enemies that have been killed and add to my experience or score
      9) make objects appear from fallen enemies for my character to grab and get stronger
      10) Create a user interface that includes difference scenes like a start scene and a play scene and an end game scene.
      .
      .
      .
      You will learn TONS as you create these programs and then you can begin patching this all together into a functional game.
      (122 votes)
  • leafers tree style avatar for user PEACH
    If i am correct we can make are own games and learn how to draw ?
    (1 vote)
    Default Khan Academy avatar avatar for user
    • aqualine ultimate style avatar for user Clara Morin
      Yes. To make complex pictures, though, you will need lots of practice. And games are even more complex. Your characters must be programmed to move and you will need to program how the game responds to a certain button.Games like Minecraft took years to code. If you can put enough effort into it, you can do the same.
      (89 votes)
  • piceratops sapling style avatar for user Musa
    how to get hopper
    (26 votes)
    Default Khan Academy avatar avatar for user
  • starky ultimate style avatar for user alekkasperski
    How do you color
    (17 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user eiza tehreem
    where u can find the challenges?
    (10 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user paullamo25
    I was wondering if this could help teach me coding for robotics? I am using Parallax Boe-Bots to code for.
    (11 votes)
    Default Khan Academy avatar avatar for user
    • spunky sam blue style avatar for user Dalendrion
      Knowing how to code in general (which you'll learn here) will help you with learning to code more specific things.

      But I don't know how much it will help with Parallax Boe-Bots. It looks like more hardware than software. You may be better off learning those tutorials.

      That doesn't mean you can't learn both, of course. ;)
      (14 votes)
  • mr pink red style avatar for user Ezra_hengeveld
    What does coding do
    (13 votes)
    Default Khan Academy avatar avatar for user
  • aqualine ultimate style avatar for user Andrew Zhu
    How do you get help on projects that have no right?
    (8 votes)
    Default Khan Academy avatar avatar for user
  • old spice man blue style avatar for user karina erial
    so coding has to do with?
    (5 votes)
    Default Khan Academy avatar avatar for user
  • piceratops ultimate style avatar for user Zikleria Gilead
    Which is more complicated, Java or JavaScript?
    (5 votes)
    Default Khan Academy avatar avatar for user
    • aqualine ultimate style avatar for user AD Baker
      Any subject can be complicated when you are first learning. There are concepts - like variables, loops, and branching - that are common to many programming languages. Typically, you would learning these concepts when you learn your first programming language, which can make learning that first language seem more difficult.

      When you can apply these concepts to the next programming language that you learn, it can make learning that second language a little easier.
      (4 votes)

Video transcript

- [Voiceover] Heyyaz! I'm Pamela, from the Khan Academy team. So you're here for Hour of Code, right? That's awesome! I can still remember my first hour of coding, when I was a little kid, and now I'm on my 10,000th hour of coding, and it's still really, really fun. There are tons of ways to learn to code, and there's so many things you can do with code, like making games, if you like PAC-MAN, or Angry Birds, or Minecraft, or, if you like Science, you can use programming to visualize the way the Universe works and help other people understand it better. If you like Medicine, you could help doctors understand what's going inside the human body, because it's really crazy. You could make robots, like self-driving cars. You could analyze data. You could make websites like Khan Academy. There's so much you can do. Here, on Khan Academy, you'll spend your Hour of Code learning to make computer-generated drawings. We can't cover that much in so little time, but we hope you're excited by your first taste of code and wanna go deeper. Here's what you'll do in the next hour. First, you'll watch these interactive talk-throughs. They're kind of like videos, where we write code and we talk while we're writing it, and you can see the result of the code on the right side, and you can pause it, just like a video. But, even better than a video, you can actually edit the code that we've written and see what happens when you change it, and then you can turn it back on when you wanna keep going. Now, remember, there's audio, so make sure you have speakers or headphones on when you're watching these. Next, you'll do a coding challenge. This is how you practice what you just learned, and earn points for completing it, going through each of the steps until you get them done. Try to get through each challenge to the end, but, if you don't, and you're getting frustrated, don't worry, just keep going to the next talk-through. Finally, at the end, you'll do a more free form creative project, where there's no right answer and the point is just to have fun while using what you've learned. And, hey, if this takes you longer than an hour, that's totally okay with us. Here, at Khan Academy, we believe that everybody should learn at their own pace. We'll always be here for you to keep learning, no matter how long it takes. Ready to get started?! Let's have a Coding Party! Woo-hoo!