Jump to main content

15+ Coding Activities for Beginners and Beyond

Planning an hour of code with students for Computer Science Education Week? Try these projects and activities to help students explore computer coding now and after!

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 more than 15 experiments kids can do 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.

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. We have a Gingerbread-themed spin for December, too, in our Gingerbread STEM collection.)

  4. 4. Butterfly Algorithms

    Branch with scratch program blocks and different phases of butterfly life cycle

    The Butterfly Algorithms lesson plan for K-3 guides beginning coders in practicing computational thinking using the life cycle of a butterfly as the subject. After developing an algorithm to model the life cycle of a butterfly, students can program it using Scratch.

  5. 5. Self-Driving Cars

    Diagram of an intersection that a self-driving car would need to navigate

    The How do Self-Driving Cars Know What to Do? activity guides students in thinking about how self-driving cars can be programmed to autonomously respond to whatever situation arises. Students think through some of the common scenarios and events the car will encounter and write an algorithm that a driverless car could follow when navigating various road scenarios like stop signs, traffic lights, and roundabouts (traffic circles). This activity encourages discussion and brainstorming as students think about the science behind self-driving cars. The activity is part of our Autonomous Cars collection of STEM materials.

  6. 6. 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. 7. 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. 8. 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. 9. 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. 10. 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 with Arduino — Physical Computing

  1. 11. Introduction to Arduino

    How to Use an Arduino (Lesson #1)

    With Arduino, students can explore programming and connect their programming with an unlimited range of robotics, electronics, and other circuit-building projects. The Introduction to Arduino lesson is designed to introduce students to physical computing (programming a microcontroller to interact with circuits).

    The lesson is broken into seven activities (with videos!) that walk students through the basics of setting up the Arduino and interacting with circuit parts like LEDs, buttons, and resistors. The lesson can be used as an introduction to Arduino programming in preparation for more advanced Arduino projects or as a refresher. Students can also access tutorial videos in the How to Use an Arduino guide.

    Get inspired! To get a sense of the kinds of projects students can do with Arduino, see the BlueBot robotics engineering project series. The 10 Robotics Projects with the BlueBot Kit collection highlights six projects that use Arduino to program BlueBot robots with specific behaviors.

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. 12. 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. 13. 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. 14. 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. 15. 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. 16. 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. 17. 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 5-11, 2022. 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:

Top
Free science fair projects.