Skip to content

How to Teach Coding with Project-Based Learning

This blog post was originally published on the Kodable blog


Let’s dive into project-based learning

A new school year brings new opportunities to explore project-based learning with computer science in your classroom. As we approach back-to-school, I like to revisit my curriculum and consider new ways to spark student interest and deepen learning.

Coding as a stand-alone activity tends to be high-interest with early elementary students. And that’s a great way to teach coding, especially if you’re new to computer science!

In my experience as a K-5 STEM teacher, I have also found that computer science projects can often lead to high-quality, meaningful learning.

In this blog post, we’ll discuss:

  1. How to teach computer science through project-based learning.
  2. Strategies for developing an essential question that helps students examine a real-world problem.
  3. A project example you can use in your K-2 classroom this school year!

Teaching Computer Science Through Project-Based Learning

Project-based learning (PBL) is a teaching approach in which students engage in and learn through authentic, meaningful projects. Rather than doing a summative project at the end of a unit, project-based learning embeds instruction into the unit. In other words, the project is the unit.

In PBL, students are often tasked with exploring a challenging problem or question. As a computer science teacher, I typically present a problem or question that relates to technology. I also try to embed authenticity into the project by guiding students to examine how computer science and technology are used in the world around us. I’ll even have my early elementary students attempt to solve a real-world problem through coding!

But how do you select age-appropriate problems for students to solve?

Tackling Real-World Problems with the Sustainable Development Goals

It can be tricky to come up with challenging problems or questions for students to solve. For this reason, at the beginning of a PBL unit, I often recommend that teachers consider the types of problems that students are interested in solving.

Year after year, my students seem to be passionate about topics like protecting the environment and helping animals – maybe you can relate! Most of my project ideas stem from the UN Sustainable Development Goals (SDGs).

The SDGs are a list of 17 global goals that the United Nations developed as a “blueprint to achieve a better and more sustainable future for all.”


My students often gravitate toward: “Climate Action,” “Life Below Water,” and “Life on Land.”

Once I have determined the general topic I want my students to explore, I will form an essential question (like the example I’ve included below).

How can we help reduce pollution in our oceans? 

Project-Based Learning with Computer Science Examples

When I introduce a PBL unit to my students, I will write the essential question on the board. We will map out some additional brainstorms, ideas, or questions we have. In the example below, you’ll see a map that we might create together based on our essential question: How can we help reduce pollution in our oceans?

Next in our conversation, I will also guide students to consider removing plastic from our oceans as a potential solution to explore.

Kodable’s Beach Cleanup activity is my go-to when teaching my K-2 students about pollution and plastic in our oceans. There is so much for students to discover and learn!

In Beach Cleanup, students will need to program their Fuzzes to collect 12 pieces of beach trash from the Fuzztopia beach. In doing so, students will rescue baby sea creatures and help them return to their families.

Once students begin doing the activity, they will be asked to reflect on a question that is closely related to our essential question:

What is something YOU can do to take care of the beach when you visit?

After doing this coding activity with students, you can extend this lesson by showing examples of beach cleaning autonomous robots. What ideas do your students have? What will they create?

Preparing for Back-to-School (and Beyond!)

The example provided in this blog post is just one small way to integrate project-based learning into your computer science curriculum. As we prepare for back-to-school and head into another jam-packed school year, we can continue to consider strategies for implementing meaningful, student-centered learning.

When students learn computer science through a practical, real-world application lens, they have more agency in their learning and as computer scientists.

And I think you’ll notice a spike in engagement, too!




One thought on “How to Teach Coding with Project-Based Learning Leave a comment

  1. Hi Maddie,

    Im a middle school CS teacher and was just curious if you have any examples from your 5th-grade class. I’m transferring to a PBL based class and so far have been teaching using the use-modify-create model but wanted to know how to modify it for pbl.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: