On HackerRank, you can learn coding like playing games, solve fun puzzles, and create your own projects!
print("Hello, Young Coder!")
It's a fun coding learning platform designed for kids like you who are interested in creating and problem-solving!
Learn coding through fun games and challenges. Solve problems to earn points and badges!
Learn how to make simple animations, games, and programs. Unleash your creativity!
Join competitions, solve problems with other kids, and progress together!
Coding is like giving instructions to a computer. Look at these simple examples - you can learn them too!
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
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:
Test your coding knowledge - see if you can answer these questions correctly!
See the cool projects other kids have made with coding - you can do this too!
A maze game made with Python where you control a character to find the exit!
Walking and jumping cartoon characters made with JavaScript!
Create a calculator program that can add, subtract, multiply and divide!
Want to learn more about coding? Here are some great resources and tutorials!
Join HackerRank, explore the amazing world of coding, and become a young programmer!
Sign Up for Free