Jump to main content

20+ Coding Activities for Beginners and Beyond

Planning an hour of code with students? These projects and activities help students explore computer coding!

Scratch code, a pixel drawing of a character on graph paper, and a computer sprite for Scratch to represent this collection of activities and lessons about computer programming and coding

It's easy for students to get started learning about computer programming and video game and app design. Basic coding involves writing an algorithmic set of steps that tell a computer exactly what to do. No matter what language or programming environment will be used, learning to write effective instructions for a computer involves breaking things down into logical and orderly steps and understanding an if/then mentality that a computer uses to perform specific tasks based on certain criteria.

We've got suggestions below for kids to explore computer coding at all levels, including introductory options that don't even require a computer! Many of these activities are short and can work well for an hour of code. Many of these can also be easily adapted for remote and asynchronous learning.

Our Raspberry Pi Projects Kit offers a programming learning sequence designed to be accessible for beginners and kids who are already interested in programming. Beyond that, we have science projects and activities for beginner, intermediate, and advanced coders.

Raspberry Pi Projects and Activities — Coding + Electronics

  1. Raspberry Pi Projects Kit Introduction by Science Buddies

    With the Raspberry Pi Projects kit, kids build their own Raspberry Pi computer and then explore computer programming with a series of eight activities that blend coding and electronics. With this kit, students use Scratch to write programs for interactive games and toys, including a drum set, a musical keyboard, a carnival-style game, light-up art, and more! The series of activities is designed to enable beginners to start building coding skills with the first activity and progressively add to their programming skills with each subsequent activity.

Raspberry Pi Project Videos

Light Up Piano Demonstration
Electronic Drumset Demonstration
Invader Alert Demonstration
Video Game Demonstration
Buzzer Game Demonstration
Digital Puppet Demonstration
Starry Night Demonstration
Spirograph Demonstration

  1. The Raspberry Pi Projects Kit works with Python, so after students do the eight guided coding activities, they can continue to use their Raspberry Pi Kit for new coding adventures with projects like Build an Adaptive Game Controller for a Raspberry Pi. For extra inspiration, see how this student used the Raspberry Pi kit to create a light-up star and this student lit up a Halloween decoration.

    Note: if you already own a Raspberry Pi, a Circuit Building Kit for Raspberry Pi is available. The Raspberry Pi Projects kit is also one of the kits featured in our 13 STEM Gifts You'll Feel Good about Giving list.

Think Like a Computer — Coding Projects and Activities for Beginners

  1. 1. Robot, Make Me a Sandwich!

    A peanut butter sandwich with jelly, peanut butter jars

    With the Robot, Make Me a Sandwich! activity, even the youngest of students are encouraged to start thinking like coders. As they create a set of directions to guide a volunteer "robot" in making a sandwich, they quickly see how important it is to think through all of the steps, be very specific, and not leave anything out.

  2. 2. Pixel Puzzle

    Graph paper with a popular video game character shown in colored squares representing pixels

    With the The Pixel Puzzle: Why Video Game Characters Look Better Today project, students use graph paper to make their own images and see what difference the resolution (or number of pixels) makes in how an image looks. This project is more about graphics and less about code, but students interested in program development or game design will be interested in the science behind how things look on the screen. Despite advancements in imaging technologies, many popular computer games (like Minecraft) use simplified images that call attention to pixels.

  3. 3. Guide a Mars Rover

    Simple maze illustration for practicing giving directions to guide someone or a computer from one spot to another

    With the Mars Rover Obstacle Course activity, students create a set of instructions to guide a pretend rover through an obstacle course. Paper-based mazes are easy to create, easy to scale in difficulty, easy to gamify, and can be great for this kind of logic-based activity, too. These activities help reinforce the kinds of thinking involved in writing programs. (For additional inspiration, see Paper Maze Programming: Start to Finish Computer Logic.)

  4. 4. Teach a Computer Cat to Draw Shapes

    A circle, square, triangle, hexagon, octagon and a line

    The Quick Draw McPaws: Teach A Computer Kitty How to Draw Shapes project is great for beginning coders. Students learn the basics of Scratch, a free drag-and-drop coding environment, and create a program with a character (a sprite) that can draw different shapes.

Projects and Activities for Intermediate Coders

  1. 1. Design a Greeting Card

    Screens from Scratch programming example

    With the Make a Greeting Card Come to Life! project, students build on their skills using the free Scratch coding environment to design their own custom greeting card with animated characters.

  2. 2. Make a Video Game

    Sample scratch interface showing blocks of code being put into place to control a cat sprite

    With the Want to Make a Video Game? Here's How! project, students use Scratch to design their first video game. As an introduction to game design and programming, this is a great starter project that introduces skills kids will continue to build upon as they continue to refine their skills and the game's playability.

  3. 3. Code a COVID-19 Simulator

    Program Your Own COVID-19 Simulator with Scratch

    With the Program Your Own COVID-19 Simulator with Scratch activity, students use Scratch to make their own COVID-19 simulation tool. Once programmed, they can explore the impact of social distancing and branch out to add additional factors to their program.

  4. 4. Make an Educational Campaign

    With the Save a Life! Teach Hands-Only™ CPR project, students use Scratch to design and program an interactive educational campaign. The example is to teach people about how to do Hands-Only CPR, but students could use this project to design an informational project to raise awareness about any topic of interest.

Programming Projects — Intermediate to Advanced

The following projects help students continue to develop their programming skills and explore new elements of coding.

Diagram showing letter substitution in a cesar cipher
  1. Hit Boxes: How Size Affects Score: the size and placement of hit boxes is important in game design and can be related to how easy or hard the game is to play.
  2. Making It Real: Incorporating Physics in Video Games: students who are serious about the realism in their game play will want to pay special attention to the role of physics in their game design.
  3. Crack the Code: Breaking a Caesar Cipher: learn what a Caesar cipher is and experiment using one by hand and then use code to see how quickly a computer can detect and crack this simple encoding strategy.
  4. Building Personal Medicine Apps to Help Patients: use MIT's App Inventor coding environment to design and create a useful app with real-world value. The sample program is for a medicine reminder app, but students can take the general premise and develop their own meaningful app.
  5. Password Security: How Easily Can Your Password Be Hacked?: use Python to write a program and see if you can use it to crack passwords of varying lengths and formats. Writing a program that can successfully guess our sample 6-character code is a challenge!
  6. Preventing SQL Injection Attacks: learn how SQL injection is used to insert malicious code into text fields on a website and then use that information to find a way to fix SQL injection vulnerabilities in a sample website.

An Hour of Code

Computer Science Education Week is December 6-12, 2021. During #CSEdWeek, educators and families around the world encourage students to try coding, often with short, introductory "hour of code" activities that help students better understand what programming is all about. A simple activity or an hour of code might spark lasting interest!

See also:

Thematic Collections

Collections like this help educators find themed activities in a specific subject area or discover activities and lessons that meet a curriculum need. We hope these collections make it convenient for teachers to browse related lessons and activities. For other collections, see the Teaching Science Units and Thematic Collections lists. We encourage you to browse the complete STEM Activities for Kids and Lesson Plans areas, too. Filters are available to help you narrow your search.

You Might Also Enjoy These Related Posts:

Free science fair projects.