Ahmed Elmalla - How I Built a Custom AI Teaching Assistant for IGCSE Python Exercises - Your Dedicated Computer Science Tutor | Learn with Kemo
Ahmed Elmalla - Your Dedicated Computer Science Tutor | Learn with Kemo
IGCSE 0478 & A-level IB Computer Science Tutor AP Computer Science A Tutor A-level VB Tutor
Ahmed Elmalla - Your Dedicated Computer Science Tutor | Learn with Kemo

Blog

How I Built a Custom AI Teaching Assistant for IGCSE Python Exercises

How I Built a Custom AI Teaching Assistant for IGCSE Python Exercises

🎯   Why I Needed an AI Teaching Assistant

As an IGCSE Computer Science tutor, one of the biggest challenges I face is supporting slow learners—especially when it comes to understanding loops and abstract programming concepts. Despite countless explanations, some students still struggle with grasping the purpose and structure of loops, or how functions like Python’s random module really work.

I wanted to speed up my teaching workflow and develop exercises that are:

  • Simple

  • Visual

  • Highly scaffolded

  • Repetitive enough to reinforce understanding

That’s when I decided to ask ChatGPT to help me build a custom AI Teaching Assistant.


🎯   The Challenge: Creating Targeted Python Exercises for Slow Learners

I asked ChatGPT to help automate the creation of exercises tailored for students with low cognitive learning skills. These students often need:

  • Visual aids

  • Tiny, digestible steps

  • Repetition without complexity

The two core topics I focused on were:

  1. Loops in Python

  2. Using the random module to generate characters


⚡  Step-by-Step: How ChatGPT Guided the Process

Here’s how ChatGPT helped me build the AI assistant through a Q&A process:

???? Topic 1: Python Loops

ChatGPT asked me:

  • What specific topic within loops should the exercises focus on?

  • What format do you want the exercise to take?

  • What are the common challenges students face?

  • What scaffolding do you typically use?

Based on this, ChatGPT generated the following prompt:

You are an AI teaching assistant, and your job is to help the teacher create Python exercises focused on loops for IGCSE Computer Science students who are slow learners or have low cognitive learning skills. Your goal is to help the teacher generate simplified, step-by-step exercises that reinforce the purpose and structure of loops. Ask the teacher: 1. What specific topic within loops should the exercises focus on today? (e.g., counting loops, iterating over lists, using while loops) 2. What format do you want the exercise to take? (e.g., fill-in-the-blank, trace-the-code, guided code writing, matching output to code) Given the topic and format, create a set of 3 exercises that: - Begin with a brief, simple explanation of the loop's purpose - Use visual analogies or simplified diagrams (describe them with text) - Break the code into tiny, digestible steps - Include at least one multiple-choice or scaffolded response option for each - Avoid complex logic and prioritize repetition and clarity Ask the teacher if they’d like the AI to generate variations of the exercises or add a mini-quiz afterward. This is a draft. Please adjust so that it works for you.


⚡  Topic 2: Random Character Generation with Python

I also wanted to generate exercises that could help students understand how to use Python's random module to produce random characters. These concepts are often difficult for slow learners to grasp without scaffolding.

Here’s the second AI Assistant Prompt ChatGPT generated for me:

 

You are an AI teaching assistant, and your job is to help the teacher create Python exercises focused on generating random characters using Python's `random` methods for IGCSE Computer Science students who are slow learners. Your goal is to help the teacher design step-by-step guided coding exercises that explain and reinforce how to: - Import the `random` module - Use appropriate methods to generate random characters (e.g., letters or symbols) - Understand how character generation works conceptually and in code Ask the teacher: 1. What type of characters should the exercise focus on? (e.g., lowercase letters, uppercase, symbols, a mix) 2. Do you want the exercise to include explanations, visual aids, or comments in the code? Given the answers, create 2-3 simple, scaffolded exercises that: - Introduce the concept with a brief explanation - Guide students through code one step at a time with clear instructions - Use comments to reinforce learning and code structure - End with a mini challenge or a fun variation to test their understanding Ask the teacher if they’d like the AI to provide answer keys or student instructions as well. This is a draft. Please adjust so that it works for you.


📝  Why These AI Assistants Work So Well

These AI assistants were built using specific, thoughtful prompts. They:

  • Customize exercises based on learning difficulties

  • Support visual, incremental learning

  • Adapt to different Python topics (loops, random, etc.)

  • Encourage active engagement from students

By guiding the AI clearly, I can now produce ready-made, targeted practice content for my learners in minutes.


📝  Want to Build Your Own AI Teaching Assistant?

Here’s a template to create one yourself:

Prompt Template:

You are an AI teaching assistant. Your job is to help a teacher automate the task of [insert task] for [insert subject and level]. The goal is to help the teacher save time and better support [insert student type or learning need]. Ask: 1. What specific topic or concept should today’s task focus on? 2. What format should the output take? (e.g., quiz, exercise, rubric) 3. Any preferred tools or examples (e.g., diagrams, explanations, analogies)? Given the input, produce [insert type of output], structured in [insert style or steps].

Try this template with your subject and modify it as needed. The better your prompt, the better your AI assistant will be.


✅ Final Thought: From Task to Assistant

Using ChatGPT as a teaching co-pilot isn’t just about saving time. It’s about:
✅ Boosting accessibility for all learners
✅ Customizing content for diverse needs
✅ Focusing teacher time on what matters most—students

Whether it’s loops, random modules, or any tricky coding concept—let the AI help you teach smarter, not harder.