How does coding fit in the science classroom?

Coding is essential, and the science classroom is a perfect place to teach it. Read on to learn more about why and how to integrate computer science into science.

By Amplify Staff | April 14, 2022

A real-world skill for solving real-world problems

We use computers and software in our professional and personal lives. Constantly.

Computer science is no longer an emerging field, but one that is established and should be talked about in K–12 classrooms.

Integrating coding science into science instruction can offer students opportunities to solve real-world problems while developing 21st-century skills.

Integrating coding and science

The Next Generation Science Standards (NGSS) have provided a new model for science instruction. Traditional science instruction often focused on either memorization or a moving through a disconnected series of hands-on investigations. The NGSS instead encourage active engagement and sense-making. They help students learn the principles of science by exploring and uncovering them in action. 

An NGSS curriculum is designed to teach students to:

  • Think like scientists and engineers.
  • Grapple with core scientific principles.
  • Support deep learning of concepts that cut across domains.

Coding is a perfect vehicle for this kind of inquiry, and it integrates seamlessly into science classrooms in grades 6–8, and even in grades K–12.

For one thing, coding requires computational thinking

What is computational thinking? It’s the kind of thinking you do before writing code. It’s when you break down an idea or problem into its smallest component parts. Computational thinking can look like designing algorithms, “decomposing” problems, and modeling phenomena. These skills mirror exactly the kind of “figuring out” promoted by the NGSS. 

Science students can also use coding to solve scientific problems themselves. For example, even in the youngest grades, students can use coding, or coding concepts, to create visual models that predict outcomes. 

Increasing success and opportunity

Access to coding is necessary for equity in education, employment, and society. Research shows that computer science boosts students’ skills across subjects in creativity, math, and reasoning. Students who learn computer science may be up to 17% more likely than others to enroll in college. According to, computer science is necessary in some form for all 21st-century careers. 

But only half of high schools offer computer science. And women, along with Black and Hispanic people, remain underrepresented in computer science—both as students, and in the workforce.

A solution: Introduce coding to students in the science classroom

Schools can provide coding instruction without needing to create a separate computer science curriculum. 

Even science teachers with less coding experience can easily deliver skills when they are integrated into a wider curriculum. Differentiated science resources also mean differentiated computer science resources, enabling teachers to support and engage all of their students. 

Creating real-world connections to coding

Some negative perceptions persist, no matter how relevant computers are to our daily lives. Those perceptions can act as barriers to students’ interests, especially for girls and other students who are underrepresented in computer science.

Some common negative perceptions are that coding is just letters and numbers written by people staring at screens alone, or that it’s written for computers rather than the real world.

To help dispel these notions, science educators can provide:

  • Coding experiences motivated by compelling real-world scientific problems.
  • Constant opportunities for collaboration and student discourse.

According to Aryanna Trejo of, even teachers can share these negative perceptions. “I hear teachers saying things like, ‘I just can’t do coding. This is too hard for me. The time is past,'” she says on Science Connections: The Podcast.

She continues: “I ask them, ‘Would you say that to your student about math or English?’ They sheepishly go, ‘No.’ I’d say, ‘Well, be as kind to yourself as you would be to your student.'”

Her message to students and teachers, in the science classroom and everywhere:
Computer science is something you can do.


Learn more about the importance of integrating coding within the science classroom:



  1. The K–12 Computer Science Framework
  2. The cognitive benefits of learning computer science
  3. West Coast Analytics Longitudinal study
  4. 2021 State of Computer Science Education: Accelerating Action Through Advocacy
  5. Diversity gaps in computer science
Coding Computer Science K–8 Science classroom

Related resources