Make Coding Super Fun!

On HackerRank, you can learn coding like playing games, solve fun puzzles, and create your own projects!

print("Hello, Young Coder!")

Start Exploring

What is HackerRank?

It's a fun coding learning platform designed for kids like you who are interested in creating and problem-solving!

Code Like Playing Games

Learn coding through fun games and challenges. Solve problems to earn points and badges!

Create Your Own Projects

Learn how to make simple animations, games, and programs. Unleash your creativity!

Learn With Friends

Join competitions, solve problems with other kids, and progress together!

Try These Simple Codes!

Coding is like giving instructions to a computer. Look at these simple examples - you can learn them too!

Python Example

This program will greet you and calculate the sum from 1 to 10:

# This is a comment, the computer ignores it

def greet():
    print("Hello, young coder!")


def calculate_sum():

    total = 0

    for num in range(1, 11):

        total += num

    return total


greet()

sum_result = calculate_sum()

print("The sum from 1 to 10 is:", sum_result)

Output:

Hello, young coder!
The sum from 1 to 10 is: 55

JavaScript Example

This program draws a moving square:

// This is a comment

let x = 0;


function drawSquare() {

  // Get the canvas element

  let canvas = document.getElementById("myCanvas");

  let ctx = canvas.getContext("2d");


  // Clear the canvas

  ctx.fillStyle = "white";

  ctx.fillRect(0, 0, canvas.width, canvas.height);


  // Draw the square

  ctx.fillStyle = "#FF6B6B";

  ctx.fillRect(x, 50, 50, 50);


  // Move the square

  x = (x + 2) % (canvas.width - 50);

  requestAnimationFrame(drawSquare);

}


drawSquare();

Output:

Quiz Challenge!

Test your coding knowledge - see if you can answer these questions correctly!

1. What does the "print" command do in programming?

2. Which symbol is used for comments in Python?

3. What can loops be used for in programming?

Look What You Can Create!

See the cool projects other kids have made with coding - you can do this too!

Simple maze game

Simple Maze Game

A maze game made with Python where you control a character to find the exit!

Python Easy Level
Animated character

Animated Characters

Walking and jumping cartoon characters made with JavaScript!

JavaScript Medium Level
Simple calculator

Your Own Calculator

Create a calculator program that can add, subtract, multiply and divide!

Multiple Languages Easy Level

More Learning Resources

Want to learn more about coding? Here are some great resources and tutorials!

Ready to Start Your Coding Journey?

Join HackerRank, explore the amazing world of coding, and become a young programmer!

Sign Up for Free