teachComputing
  • Home
  • AI
    • AI Literacy >
      • AI Alliteration
      • Describing Monsters
      • Dystopian writing
      • Bringing literacy to life with AI
      • AI Literacy Prompts
    • AI Computing >
      • AI Computing Lessons >
        • Make me happy
        • Chatting Robot
        • Supervised Learning
        • Fooled
        • Socratic Debate
        • Moral Machine
        • Chatting Robot
      • AI Coding Strategies
      • AI Computing Prompts
    • AI Prompts
  • Teaching & Learning
    • Wellbeing
    • Blog
    • Humour >
      • Teacher Humour
      • Teacher Humor
    • PLN Challenge >
      • Covering your backside
      • Online Privacy
      • Twitter Challenge >
        • Twitter All Star
        • Challenge 1
        • Challenge 2
        • Challenge 3
        • Tips for staying safe on Twitter
        • Tips for hosting Edu Twitter Chats
        • Tips for taking part in Twitter chats
        • It's all about the hashtag! Essential chats for educators
        • How to storify a chat
        • How to schedule Tweets
        • Twitter Lists
        • NT2tEU
      • Facebook Challenge >
        • Challenge 4
        • Challenge 5
        • Challenge 6
        • Tips for staying safe on Facebook
      • Google Challenge >
        • Challenge 7
        • Challenge 8
        • Challenge 9
      • Pinterest Challenge >
        • Challenge 10
        • Challenge 11
        • Challenge 12
        • Tips for using Pinterest
      • Blog Challenge >
        • Challenge 13
        • Challenge 14
        • Challenge 15
        • How to create a classroom blog
      • Staffrm Challenge >
        • Challenge 16
        • Challenge 17
        • Challenge 18
      • Skype Challenge >
        • Challenge 19
        • Challenge 20
        • Challenge 21
      • Edmodo Challenge >
        • Challenge 22
        • Challenge 23
        • Challenge 24
      • TeachMeet Challenge >
        • Challenge 25
        • Challenge 26
        • Challenge 27
      • In-school challenge >
        • Challenge 28
        • Challenge 29
        • Challenge 30
      • 30 ways to grow your PLN
    • Tools for Teachers >
      • Web 2.0 >
        • Top 10 Web 2.0 Tools
        • Classroom Response Tools
      • Quiz Tools
      • Classroom Management Tools
      • Software >
        • Media Conversion Tools
        • Application Software
      • Multimedia >
        • Free Music
    • BYOD
    • Digital Leaders >
      • Digital Leaders Blog >
        • DL Archive
      • DL Tips
      • Quotes
      • Links
    • Flipped Learning >
      • Flipped Classroom vs. Blended Classroom
    • Gamification >
      • Gamification vs. Game Based Learning vs. Game Design
    • School Closures
    • Game Based Learning >
      • Minecraft >
        • Minecraft in Education
        • Minecraft Lesson Ideas
        • Minecraft Literacy
        • Real Life Minecraft
        • Minecraft Top Tips
        • Minecraft Coding Tutorials >
          • Minecraft Code Builder Setup
          • Minecraft Code: Walking on Air
          • Minecraft Code: Hello World
          • Minecraft Code: Functions
          • Minecraft Code: Rainbow
          • Minecraft Code: Skyscraper
          • Minecraft Pixel Art
    • The magic of >
      • The magic of Computing
      • The magic of Maths
      • The magic of Science
      • The magic of Literacy
    • Road2e2
    • T&L Blog
  • Computing
    • Computing Blog >
      • GCSE Computer Science
      • General
    • Teaching Computer Science >
      • CPD >
        • Blocks to Code
        • Tutorials >
          • How to embed Flash into PowerPoint
          • How to embed YouTube videos in to PowerPoint
          • How to create a wiki
          • How to create a classroom blog
      • Schemes of Work
      • Programming Resources
      • Theory
      • Posters >
        • Binary Posters
      • Festive Computing Activities
      • FLOPPYS 2020
      • FLOPPYS 2021
      • FLOPPYS 2022
      • Game Design
      • App Creation
    • Theory Lessons >
      • Theory Tests
      • Computer Hardware >
        • Input / Output
        • CPU
        • LMC
        • Storage Devices
        • Memory (RAM / ROM)
        • Hardware
      • Binary Lessons >
        • Units of Data
        • Binary Representation
        • Binary Representation of Images >
          • Binary Representation of Images (Festive)
          • Pixel Painter
        • Binary Representation of Characters
        • Binary Representation of Sound >
          • ADC Simulator
        • Binary Representation of Instructions
        • Binary Addition
        • Hexadecimal
      • Software >
        • Operating System
        • Types of Software
        • Utility Software
      • Programming >
        • Flowcharts
      • Computational Thinking >
        • Data Science
    • Digital Literacy >
      • Social Media (Good or Bad thing?)
      • Cyberbullying
      • Staying Safe Online
    • Games >
      • Binary Games >
        • Binary Blitz!
        • Binary Brainiac
        • Binary Blaster
        • Binary Blast Off
    • Binary >
      • ASCII Converter
      • Binary to Decimal
      • Binary to Hex
      • Binary Calculator
    • Escape Rooms >
      • Breakout Edu
      • Escape Timers >
        • Escape Timer
        • Team Timer
        • Binary Timer
      • Binary Escape
    • ICT Strand >
      • Fake News Project >
        • Fake News 1
        • Fake News 2
        • Fake News 3
        • Fake News 4
        • Fake News 5
      • Spreadsheet Modelling
      • Superhero Movie Trailer
      • PowerPoint Task
      • Digital Imaging
      • Paint 3D Tutorial
    • Programming Lessons >
      • Scratch >
        • Festive Scratch >
          • Music Festive with Scratch
          • Turtle Snowflakes
          • What's your elf name
          • Secret Santa
        • Making music with Scratch
        • Sorting Hat Lesson
        • Turtle Time
        • Superhero name generator
        • Compliment Generator
        • Magic 8 ball
      • Python >
        • Chatbot
        • Coding Golf
        • Turtle Time >
          • Turtle Instructions
        • Magic 8 ball
        • Python Mad Libs
        • Rock Paper Scissors
        • Shakespearean Insult Generator >
          • Shakespearean Insult Generator Part 2
        • Compliment generator
        • Sorting Hat
        • Superhero name generator
        • Cards Against
        • Guess the word
        • Guess the number
        • Festive Python >
          • What's your elf name
          • Secret Santa
          • Turtle Snowflakes
      • Little Man Computer
      • Hour of Code >
        • Hour of Code Music
        • Python Tutorials
        • HoC 8-Bit Challenge
        • Music MicroPython (Festive)
      • Raspberry Pi >
        • Networking the Pi
        • Minecraft Pi
        • Harry Potter Sorting Hat >
          • Harry Potter Sorting Hat (GPIO)
        • Raspberry Pi LTSP (Networked Classroom)
        • Astro Pi
    • Homeschooling
    • Remote Learning >
      • Fun Python Tutorials
      • Python Tutorials >
        • Chatbot Tutorial
        • Dice Roll
        • Turtle Tutorial
        • Magic 8 ball
        • Sorting Hat
        • Rock Paper Scissors Tutorial
        • Cards Against
        • Python Mad Libs
        • Shakespearean Insult Generator >
          • Shakespearean Insult Generator Part 2
        • Guess the word
        • Guess the number
        • Superhero name generator
        • Compliment generator
        • Festive Python Tutorials >
          • What's your elf name
          • Secret Santa
          • Turtle Snowflakes
      • Scratch Tutorials >
        • Sorting Hat
        • What's your superhero name
        • Turtle Time Tutorial
        • Compliment Generator
        • Magic 8 Ball
        • Festive Scratch Tutorials >
          • Festive Music with Scratch
          • Secret Santa Scratch Tutorial
          • Turtle Snowflakes Tutorial
          • What's your elf name
    • Revision >
      • Data Representation >
        • Binary Representation of Images
        • Binary Representation of Sound
  • 21 Things
    • 21 Things To Try >
      • ConnectEd
      • Social Media >
        • Twitter
        • Pinterest
        • Facebook Groups
        • Facebook Pages
        • Google+ Communities
        • Staffrm
        • Edmodo
        • Mystery Skype
        • Blogging
        • Classroom Blogging
      • Gamification
      • Flipped Classroom
      • Breakout Edu
      • Edu Podcasts
      • Jar of Awesome
      • TeachMeet
      • Team Teaching
      • Mixed Reality
      • Digital Leaders
      • Genius Hour
      • Sketchnoting
    • Computing >
      • CS 20
      • Code Golf
      • PRIMM
      • Under The Hood
      • Unplugged
      • Podcasts
      • Facebook Groups CS
      • Flipped Classroom CS
      • Teach with Magic
      • Socratic Debate
      • Coding Music
    • 21 Things Keep Fit >
      • 20 Health Hacks
      • Home Health Hacks
    • 21 Things PLN >
      • Edmodo
      • Twitter
      • Reply to a blog
      • Skype
      • Cofee Edu
      • Pinterest
      • Reach out
      • Conferences
      • Instagram
      • Ning
      • MEC
      • Voxer
      • LinkedIn
  • Microbit
    • Physical Computing >
      • micro:bit LEDs
      • micro:bit PIR
      • micro:bit Servo
      • micro:bit Temp
      • micro:bit LDR
      • micro:bit Moisture
      • micro:bit RGB LEDs
      • micro:bit HC-SR04 3v3
      • micro:bit HC-SR04 5v
      • micro:bit Push button
      • micro:bit Potentiometer
      • micro:bit Piezo
    • Music >
      • Music Festive
    • Festive Projects
    • Projects >
      • Music
      • Music MicroPython
      • Servo Animals
    • Lessons >
      • Magic 8 Ball
      • Harry Potter Sorting Hat
    • Quick Start Guide
    • Microbit Simulator
  • #100 Ideas
    • Testimonials
    • Competition >
      • Competition 2
    • Worksheets
    • Bonus Ideas >
      • What's your elf name
      • Make me happy
      • Guess the word
      • Cards Against Humanities
      • Compliment generator
      • Data Science
    • Curriculum
    • ISTE
    • CSTA
  • About
    • Privacy
  • Home
  • AI
    • AI Literacy >
      • AI Alliteration
      • Describing Monsters
      • Dystopian writing
      • Bringing literacy to life with AI
      • AI Literacy Prompts
    • AI Computing >
      • AI Computing Lessons >
        • Make me happy
        • Chatting Robot
        • Supervised Learning
        • Fooled
        • Socratic Debate
        • Moral Machine
        • Chatting Robot
      • AI Coding Strategies
      • AI Computing Prompts
    • AI Prompts
  • Teaching & Learning
    • Wellbeing
    • Blog
    • Humour >
      • Teacher Humour
      • Teacher Humor
    • PLN Challenge >
      • Covering your backside
      • Online Privacy
      • Twitter Challenge >
        • Twitter All Star
        • Challenge 1
        • Challenge 2
        • Challenge 3
        • Tips for staying safe on Twitter
        • Tips for hosting Edu Twitter Chats
        • Tips for taking part in Twitter chats
        • It's all about the hashtag! Essential chats for educators
        • How to storify a chat
        • How to schedule Tweets
        • Twitter Lists
        • NT2tEU
      • Facebook Challenge >
        • Challenge 4
        • Challenge 5
        • Challenge 6
        • Tips for staying safe on Facebook
      • Google Challenge >
        • Challenge 7
        • Challenge 8
        • Challenge 9
      • Pinterest Challenge >
        • Challenge 10
        • Challenge 11
        • Challenge 12
        • Tips for using Pinterest
      • Blog Challenge >
        • Challenge 13
        • Challenge 14
        • Challenge 15
        • How to create a classroom blog
      • Staffrm Challenge >
        • Challenge 16
        • Challenge 17
        • Challenge 18
      • Skype Challenge >
        • Challenge 19
        • Challenge 20
        • Challenge 21
      • Edmodo Challenge >
        • Challenge 22
        • Challenge 23
        • Challenge 24
      • TeachMeet Challenge >
        • Challenge 25
        • Challenge 26
        • Challenge 27
      • In-school challenge >
        • Challenge 28
        • Challenge 29
        • Challenge 30
      • 30 ways to grow your PLN
    • Tools for Teachers >
      • Web 2.0 >
        • Top 10 Web 2.0 Tools
        • Classroom Response Tools
      • Quiz Tools
      • Classroom Management Tools
      • Software >
        • Media Conversion Tools
        • Application Software
      • Multimedia >
        • Free Music
    • BYOD
    • Digital Leaders >
      • Digital Leaders Blog >
        • DL Archive
      • DL Tips
      • Quotes
      • Links
    • Flipped Learning >
      • Flipped Classroom vs. Blended Classroom
    • Gamification >
      • Gamification vs. Game Based Learning vs. Game Design
    • School Closures
    • Game Based Learning >
      • Minecraft >
        • Minecraft in Education
        • Minecraft Lesson Ideas
        • Minecraft Literacy
        • Real Life Minecraft
        • Minecraft Top Tips
        • Minecraft Coding Tutorials >
          • Minecraft Code Builder Setup
          • Minecraft Code: Walking on Air
          • Minecraft Code: Hello World
          • Minecraft Code: Functions
          • Minecraft Code: Rainbow
          • Minecraft Code: Skyscraper
          • Minecraft Pixel Art
    • The magic of >
      • The magic of Computing
      • The magic of Maths
      • The magic of Science
      • The magic of Literacy
    • Road2e2
    • T&L Blog
  • Computing
    • Computing Blog >
      • GCSE Computer Science
      • General
    • Teaching Computer Science >
      • CPD >
        • Blocks to Code
        • Tutorials >
          • How to embed Flash into PowerPoint
          • How to embed YouTube videos in to PowerPoint
          • How to create a wiki
          • How to create a classroom blog
      • Schemes of Work
      • Programming Resources
      • Theory
      • Posters >
        • Binary Posters
      • Festive Computing Activities
      • FLOPPYS 2020
      • FLOPPYS 2021
      • FLOPPYS 2022
      • Game Design
      • App Creation
    • Theory Lessons >
      • Theory Tests
      • Computer Hardware >
        • Input / Output
        • CPU
        • LMC
        • Storage Devices
        • Memory (RAM / ROM)
        • Hardware
      • Binary Lessons >
        • Units of Data
        • Binary Representation
        • Binary Representation of Images >
          • Binary Representation of Images (Festive)
          • Pixel Painter
        • Binary Representation of Characters
        • Binary Representation of Sound >
          • ADC Simulator
        • Binary Representation of Instructions
        • Binary Addition
        • Hexadecimal
      • Software >
        • Operating System
        • Types of Software
        • Utility Software
      • Programming >
        • Flowcharts
      • Computational Thinking >
        • Data Science
    • Digital Literacy >
      • Social Media (Good or Bad thing?)
      • Cyberbullying
      • Staying Safe Online
    • Games >
      • Binary Games >
        • Binary Blitz!
        • Binary Brainiac
        • Binary Blaster
        • Binary Blast Off
    • Binary >
      • ASCII Converter
      • Binary to Decimal
      • Binary to Hex
      • Binary Calculator
    • Escape Rooms >
      • Breakout Edu
      • Escape Timers >
        • Escape Timer
        • Team Timer
        • Binary Timer
      • Binary Escape
    • ICT Strand >
      • Fake News Project >
        • Fake News 1
        • Fake News 2
        • Fake News 3
        • Fake News 4
        • Fake News 5
      • Spreadsheet Modelling
      • Superhero Movie Trailer
      • PowerPoint Task
      • Digital Imaging
      • Paint 3D Tutorial
    • Programming Lessons >
      • Scratch >
        • Festive Scratch >
          • Music Festive with Scratch
          • Turtle Snowflakes
          • What's your elf name
          • Secret Santa
        • Making music with Scratch
        • Sorting Hat Lesson
        • Turtle Time
        • Superhero name generator
        • Compliment Generator
        • Magic 8 ball
      • Python >
        • Chatbot
        • Coding Golf
        • Turtle Time >
          • Turtle Instructions
        • Magic 8 ball
        • Python Mad Libs
        • Rock Paper Scissors
        • Shakespearean Insult Generator >
          • Shakespearean Insult Generator Part 2
        • Compliment generator
        • Sorting Hat
        • Superhero name generator
        • Cards Against
        • Guess the word
        • Guess the number
        • Festive Python >
          • What's your elf name
          • Secret Santa
          • Turtle Snowflakes
      • Little Man Computer
      • Hour of Code >
        • Hour of Code Music
        • Python Tutorials
        • HoC 8-Bit Challenge
        • Music MicroPython (Festive)
      • Raspberry Pi >
        • Networking the Pi
        • Minecraft Pi
        • Harry Potter Sorting Hat >
          • Harry Potter Sorting Hat (GPIO)
        • Raspberry Pi LTSP (Networked Classroom)
        • Astro Pi
    • Homeschooling
    • Remote Learning >
      • Fun Python Tutorials
      • Python Tutorials >
        • Chatbot Tutorial
        • Dice Roll
        • Turtle Tutorial
        • Magic 8 ball
        • Sorting Hat
        • Rock Paper Scissors Tutorial
        • Cards Against
        • Python Mad Libs
        • Shakespearean Insult Generator >
          • Shakespearean Insult Generator Part 2
        • Guess the word
        • Guess the number
        • Superhero name generator
        • Compliment generator
        • Festive Python Tutorials >
          • What's your elf name
          • Secret Santa
          • Turtle Snowflakes
      • Scratch Tutorials >
        • Sorting Hat
        • What's your superhero name
        • Turtle Time Tutorial
        • Compliment Generator
        • Magic 8 Ball
        • Festive Scratch Tutorials >
          • Festive Music with Scratch
          • Secret Santa Scratch Tutorial
          • Turtle Snowflakes Tutorial
          • What's your elf name
    • Revision >
      • Data Representation >
        • Binary Representation of Images
        • Binary Representation of Sound
  • 21 Things
    • 21 Things To Try >
      • ConnectEd
      • Social Media >
        • Twitter
        • Pinterest
        • Facebook Groups
        • Facebook Pages
        • Google+ Communities
        • Staffrm
        • Edmodo
        • Mystery Skype
        • Blogging
        • Classroom Blogging
      • Gamification
      • Flipped Classroom
      • Breakout Edu
      • Edu Podcasts
      • Jar of Awesome
      • TeachMeet
      • Team Teaching
      • Mixed Reality
      • Digital Leaders
      • Genius Hour
      • Sketchnoting
    • Computing >
      • CS 20
      • Code Golf
      • PRIMM
      • Under The Hood
      • Unplugged
      • Podcasts
      • Facebook Groups CS
      • Flipped Classroom CS
      • Teach with Magic
      • Socratic Debate
      • Coding Music
    • 21 Things Keep Fit >
      • 20 Health Hacks
      • Home Health Hacks
    • 21 Things PLN >
      • Edmodo
      • Twitter
      • Reply to a blog
      • Skype
      • Cofee Edu
      • Pinterest
      • Reach out
      • Conferences
      • Instagram
      • Ning
      • MEC
      • Voxer
      • LinkedIn
  • Microbit
    • Physical Computing >
      • micro:bit LEDs
      • micro:bit PIR
      • micro:bit Servo
      • micro:bit Temp
      • micro:bit LDR
      • micro:bit Moisture
      • micro:bit RGB LEDs
      • micro:bit HC-SR04 3v3
      • micro:bit HC-SR04 5v
      • micro:bit Push button
      • micro:bit Potentiometer
      • micro:bit Piezo
    • Music >
      • Music Festive
    • Festive Projects
    • Projects >
      • Music
      • Music MicroPython
      • Servo Animals
    • Lessons >
      • Magic 8 Ball
      • Harry Potter Sorting Hat
    • Quick Start Guide
    • Microbit Simulator
  • #100 Ideas
    • Testimonials
    • Competition >
      • Competition 2
    • Worksheets
    • Bonus Ideas >
      • What's your elf name
      • Make me happy
      • Guess the word
      • Cards Against Humanities
      • Compliment generator
      • Data Science
    • Curriculum
    • ISTE
    • CSTA
  • About
    • Privacy
Search by typing & pressing enter

YOUR CART

Coding Strategies: Using AI to reduce cognitive load

Reading time: 6 mins
Last updated: 29/06/2025

Introduction

In the ever-evolving landscape of education, technology continues to play a pivotal role in shaping how students learn and engage with complex subjects. One of the most promising advancements in this area is the use of generative AI to support children with learning to code. By leveraging the power of AI, educators can create dynamic and interactive learning experiences that cater to the diverse needs of students.

Generative AI offers innovative solutions for teaching coding, such as creating Parsons problems, worked examples, and lessons using the PRIMM (Predict, Run, Investigate, Modify, Make) framework. These tools not only reduce cognitive load but also foster a deeper understanding of programming concepts. In this blog post, I will explore how generative AI can be used to support children when learning to code by providing personalised and effective learning aids that enhance student engagement and comprehension.

What is cognitive load?

Cognitive load relates to the amount of information that working memory can hold at one time.​

New information is first processed by the brain’s limited short-term or working memory, which is typically able to hold two to seven elements at a time. This information is then transferred into the brain’s unlimited long-term memory. ​

​If the brain’s working memory is overloaded with new information, it hampers, reduces, or stops the transfer of information into long-term memory, which is necessary to retain learning.

What is Generative AI?

Generative AI is a type of artificial intelligence that can create original content, such as images, music, and text. While some types of AI analyse data to predict future outcomes (as seen in predictive text), generative AI goes a step further. It uses patterns it has learned from data to generate entirely new examples. 

AI tools used in this blog post:
  • Microsoft 365 Copilot: m365.cloud.microsoft/chat
  • Google Gemini: gemini.google.com
  • NotebookLM: notebooklm.google.com
  • ChatGPT: chatgpt.com

AI prompts

Using AI to create worked examples

​Commonly used in a range of subjects, including Maths and Science, worked examples are a form of ‘scaffolding’ designed to help reduce cognitive load placed on novice learners.   

When a learner is given a partial (or near complete) solution to a problem, they do not have to rely as much on their long-term memory. Worked examples aim to reduce the superfluous cognitive load often placed on learner’s working memory, when faced with new / complex problems, by providing a model solution to a problem. Worked examples, when used in conjunction with traditional practice problems, can also help learners develop strategies for solving similar problems when faced with them in the future. 

​How it works:

- Prepare a partial solution to a problem for the students to complete.
- Provide a brief description of what the code is meant to do, this can be in the form of comments or verbal explanation.
- Use sub-goal labelling to identify each of the important steps in the code.
- Add questions / prompts with the aid of comments or annotations.

​
Example
Picture
​Using generative AI to create worked examples

When leveraging AI to create worked examples, it's most effective to start with a clear description and an initial example. Keep in mind that generative AI is conversational, so use iterative prompting to refine and enhance your results.

Example prompt:

​Prompt 1:
  • Worked examples are a form of scaffolding designed to help reduce cognitive load when teaching children how to code.
    How it works:
    - Prepare a partial solution to a problem for the students to complete.
    - Provide a brief description of what the code is meant to do, this can be in the form of comments or verbal explanation.
    - Use sub-goal labelling to identify each of the important steps in the code.
    - Add questions / prompts with the aid of comments or annotations.

Prompt 2:
  • Here is an example of a worked example for drawing a regular polygon square shape using the turtle library in Python:

    #Import the turtle library
    import turtle 
    #Create a new window
    window = turtle.Screen() 
    #Create a new turtle called timmy
    timmy = turtle.Turtle() 
    #Create a square with each side equalling 100 pixels in length
    for loopCounter in range( ): #What value goes here?
       timmy.forward( ) #what value goes here?
       timmy.right(90)

Prompt 3:
  • Create a worked example for drawing a regular hexagon shape using the turtle library in Python.
Example response
Picture
Faded Examples

​As learners become more proficient, the benefits of using worked examples are reduced to the point at which they may start to become a hindrance rather than a help! As with any type of scaffolding and support, worked examples should be faded to provide stretch and challenge. 

Imagine a faded example as a sort of fill-in the-blank challenge, but with code. Start by giving students a near complete solution to a problem and challenge them to fill in the blanks. Over time, add more and more blanks until the student is essentially writing the solution for themselves. The following demonstrates a greatly simplified example of a fading using the Turtle library in Python.
Faded example in Python (phase 1)
Worked example
Faded example in Python (final phase)
​Faded worked example
AI prompt for creating a faded example:

​Prompt:

I’m creating a beginner-friendly coding tutorial using the “faded worked example” technique. This method involves showing students a nearly complete Python code example and gradually removing parts for them to complete.
Please generate a series of 4 faded worked examples for each of the following shapes using the turtle library in Python: Square, Triangle, Pentagon, and Hexagon.
For each shape:
  • Start with a fully worked example.
  • Then create 3 progressively faded versions, each with more missing code (e.g., missing lines, parameters, or logic).
  • Use comments like # TODO: fill in this line to indicate blanks.
  • Format the output in Markdown with code blocks and clear section headers for each shape and each step.
The goal is to help beginner coders learn how to draw regular polygons by gradually increasing their independence.


Example response:
Picture
Notice that AI has created several faded examples for each shape. If the desired outcome was for each shape to represent a different phase of fading, we can adjust our prompt as follows:

New prompt:

I’m creating a beginner-friendly coding tutorial using the “faded worked example” technique. This method involves showing students a nearly complete Python code example and gradually removing parts for them to complete.
Please generate a progressive series of 4 faded worked examples using the turtle library in Python to draw the following regular polygons:
  • Square (fully worked example)
  • Triangle (some lines missing)
  • Pentagon (more lines missing)
  • Hexagon (minimal code provided)
Instructions:
  • Each shape should represent a different phase of fading.
  • Use comments like # TODO: fill in this line to indicate missing parts.
  • Format the output in Markdown with code blocks and clear section headers for each shape.
  • Assume the audience is beginner coders learning how to use loops and turtle graphics.
Picture
​Worked example: Square
Picture
Faded example: Triangle


Using AI to create Parsons Problems

Parsons problems are programming puzzles where a working solution to a problem has been broken up into blocks of code and jumbled up. Students are given the mixed-up code and challenged to re-assemble the code in the correct order. Some Parsons problems, often referred to as two-dimensional Parsons problems, also require the code blocks to be indented correctly. Parsons problems can also contain extra lines of code, called distractors, which are not needed for the code to work.

​Although primarily used with text-based languages, Parsons problems can also be used with block-based languages too! The idea behind parson problems is to allow students to focus on the core concepts such as flow of control, conditionals and loops, without the frustration of syntax errors. 

Example of a Parsons problem with distractors:

timmy = turtle.Turtle()
window = turtle.Screen()
timmy.forward(100)
timmy.right(90)
timmy.turn(90)
For loopCounter in range(4)
for loopCounter in range(4):
import turtle 

Example prompt:

Generate a series of Parsons Problems designed to teach students how to draw regular polygons using loops in Python's turtle library. Each problem should:
  • Focus on one of the following shapes: square, triangle, hexagon, pentagon, octagon.
  • Include all necessary lines of code, but jumbled.
  • Include at least two plausible distractor lines that are not needed for the correct solution.
  • Be formatted as a list of code lines (not in order), with distractors clearly mixed in.
  • Avoid giving away the correct order or identifying distractors.
  • Provide each problem in a separate section labelled with the shape name.

For extra clarity, you can provide AI with an example of what you're looking for.

Additional prompt:
  • Here is an example of a Parsons Problem, with distractors, for drawing a regular polygon square shape using the turtle library in Python.
    timmy = turtle.Turtle()

    window = turtle.Screen()
    timmy.forward(100)
    timmy.right(90)
    timmy.turn(90)
    For loopCounter in range(4)
    for loopCounter in range(4):
    import turtle 

Example response
Picture
Picture
Picture
Picture

Using AI to create lessons using PRIMM

PRIMM is a research-based approach to teaching programming. It is made up of five stages: Predict, Run, Investigate, Modify, Make. Each stage is used in planning lessons and activities to support the learning of programming.

The five stages of PRIMM are:
  • Predict: Students are given a working program and challenged to predict what the code will do. At this level, the focus is on what the code actually does.
  • Run: Students run the program so that they can test their predictions and discuss their findings with their partner or the rest of the class. 
  • Investigate: The teacher provides a range of scaffolded activities aimed to help the students to explore what each line of code does. Strategies can include tracing, commenting code, annotating, debugging, etc. 
  • Modify: Students are challenged to modify the working program in order to change its functionality in some way. 
  • Make: Students design a new program that is based on the given solution but which solves a new problem.

​Example prompt:

Design a detailed lesson plan for a Python lesson, using PRIMM, where the end goal is to create a Magic 8-ball game. The lesson should be aligned with the National curriculum in England: secondary curriculum (key stage 3). Please structure the lesson into distinct segments: a 10-minute starter activity to introduce the topic, a 10-minute introduction to the topic, a 30-minute hands-on activity to reinforce learning, and a 10-minute formative assessment to gauge student understanding. Include in your plan: specific learning objectives, materials needed for each segment, strategies for student engagement, and clear assessment criteria.
Picture
​Phase 1: Predict
Picture
​Phase 2: Run

You may also be interested in:

  • AI computing prompts
  • ​AI coding strategies
  • AI computing lesson plans​
Powered by Create your own unique website with customizable templates.