Teaching Elementary Students Computational Thinking in the Age of AI
Lessons on digital citizenship, coding, debugging code, prompting AI, and analyzing AI outputs help students develop valuable skills.
Your content has been saved!
Go to My Saved Content.Computer science teachers have experienced a lot of turmoil since the advent of AI. Maybe you are even in a district considering cutting technology teachers because artificial intelligence can be easily integrated into general education classrooms. Here’s how computer science teachers can rethink their roles as we consider the role of AI in education.
Core Topics for Computer Science Instruction
One thing that computer science teachers become good at very quickly is being really practical at figuring out how to break down information into manageable chunks, modeling the role of both syntax instructor and logic architect. Syntax instructors teach the breaking down of code for students to put back together. Syntax instruction, like teaching a language course, teaches specific grammatical rules required to write functional code. Logic architects think about the reasoning behind why you would want to create the code before writing the code. Here are specific skills and activities that are now more valuable than ever in computer science classrooms.
Formal verification logic in computer science is the super-careful, mathematical safety check that humans do that proves a computer program or robot does what it is supposed to do without mistakes. One way to assist students in performing verification logic tasks is to provide them rubrics to peer-review an AI’s code or output. Encouraging students to ask where the AI took shortcuts is easier if they have a checklist or guideline to confirm what they need to see. For a student, a rubric is their version of verification logic because then they are learning that their output meets the requirements.
Becoming digital citizens. Does our digital citizenship conversation need an upgrade in the age of AI? Yes! Digital citizenship and AI digital citizenship are everyone’s responsibility so that active learning doesn’t get replaced by cognitive shortcuts. It takes our whole community for the students to know how to use technology as a tool and not a toy. Many ethics and digital citizenship conversations have naturally turned to artificial intelligence in computer science classrooms.
Writing pseudocode. You can ask students to pseudocode, which is similar to writing a rough draft. This can be done in text or drawing form prior to writing code. By asking students to pseudocode, teachers demonstrate the thinking that happens in the brain, whereas coding can happen in the machine. I like to give my third graders sticky notes to flow-chart the code before even touching the computer. Computer science becomes a mental endeavor, and coding becomes a more mechanical application of the original idea.
Using pattern recognition to debug code. Learning the logic of coding through the language and steps of the computational thinking process is needed in the age of AI. Analyzing the code that AI creates is actually a higher-level cognitive task because you are not just writing code but demonstrating code literacy. Students won’t be able to fix AI unless they know the language and logic first.
One example of how computer science teachers can extend the conversation is during pattern recognition. In elementary computer science courses, we teach pattern recognition so that students can learn how to debug, or find mistakes in, their code. Now computer science teachers can make connections to how finding mistakes in AI-generated code is a good reason to keep up those debugging skills. Teaching someone that we need people to fix the AI is a spin on the skill.
Analyzing code for errors. Abstraction is a type of shortcut in computer science when we focus on essential features while ignoring unnecessary details. Tools like Canva Code allow students to create no-code games, and then to look at the code that is being generated and see if they can spot errors on their own. AI and no-code tools are the ultimate abstractions because teachers can show students how to look behind the curtain. By working backward, students can take a look at code already created. Asking which shortcuts were essential for the AI to take and which caused issues in the final product can reinforce these skills.
Learning about classification errors. Even with our youngest learners, we can demonstrate AI mistakes with classification errors. I have second graders use Google’s Teachable Machine image generator to identify two holiday objects. Since spring holidays are coming up, I may have them upload images of baby chicks and baby lambs, and ask Google to learn the difference. The aha moment comes when students realize that when they replace their original image with a different version of the baby animal, sometimes the machine guesses wrong.
The discussions range from “Why is that?” to “Did we take enough photos for data?” You can also ask students to think about how they created the data. Was the image of the lamb on a brown table? Does the color of the image confuse the machine? I challenge the students to scrutinize the confidence score that Google provides and ask if the computer is 95 percent sure or 51 percent sure. Asking students to think about what changed in the frame to make the scores change adds a layer of understanding.
Using modular prompting. Modular prompting is a way to interact with AI that involves breaking down complex tasks into smaller, organized parts. This is coding at a higher level of abstraction because students have to understand vocabulary such as variables and loops to understand the conversation with the AI.
In a traditional computer science class, students would code a game. Since AI can code quickly, where does the code they are learning fit into the class? Instead of having students ask AI to write a game for them, one successful technique is to ask AI to demonstrate the physics, the scoring, and other parts of the game through modular prompting.
