Event Information
Session Plan: Integrating Prompt-based Coding into the Programming Classroom
Session Title: Integrating Prompt-based Coding into the Programming Classroom
Duration: 60 minutes
Target Audience: Educators and students new to the concept of using AI for coding.
Session Goal: AI is changing the world of programming. This session will introduce prompt-based coding as a supplementary tool to enhance, not replace, traditional programming education by showcasing its utility in scaffolding, debugging, and learning.
Session Outline & Timeline
Time: O-5 minutes
Section: Introduction & Icebreaker
Activity: Welcome participants and briefly introduce the concept of prompt-based coding.
Icebreaker: Ask, "What's one tedious coding task you wish you could automate?"
Time: 5-15
Section: Core Concepts
Activity: Define prompt-based coding and discuss the "why":
Accelerate Development: Instead of searching for documentation on how to format a date, a student can ask, "Show me how to format a date in Python to look like 'Month Day, Year'."
Aid in Learning: A student struggling with a new concept can ask, "Explain recursion in Python using an analogy of a Russian nesting doll."
Overcome Coder's Block: When stuck, a student can prompt, "Give me three different ways to approach solving the FizzBuzz problem in Python."
Time: 15-35
Section: Hands-On
Activity: Activity 1: Building a Function with an AI Partner
Hands-on: Introduce the task: Create an original Python function that takes a list of numbers as a parameter, uses a for loop to iterate through it, and uses a conditional statement to return a new list containing only the even numbers. Participants will use prompts to get help, not the final answer.
Prompt Examples: "Give me an idea for a Python function that filters a list of numbers." or "What is the syntax for a for loop that iterates through a list in Python?" or "How can I check if a number is even inside my loop?"
Walk through the results and steps to correct the example code.
Example Target Function: python
def find_evens(numbers):
even_numbers = []
for number in numbers:
if number % 2 == 0:
even_numbers.append(number)
return even_numbers # This should be outside the loop
# Define the list of numbers and call the function
my_numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9]
evens = find_evens(my_numbers)
print(evens)
Time: 35-45
Section: Hands-On
Activity: Activity 2: Debugging with AI
Hands-on: Provide participants with a block of buggy code. They will use a prompt to ask an AI tool to find and explain the bug.
Prompt Example: "Debug this Python code and explain the error."
Buggy Code Example: Python
def calculate_average(nums):
total = 0
for num in nums:
total += num
return total / len(nums) # Bug: Integer division in Python 2, or potential for ZeroDivisionError if nums is empty.
Time: 45-55
Section: Discussion & Best Practices
Activity: Facilitate a discussion on limitations and best practices:
"Duck Walking" Through Code: Explain how prompting an AI to explain a line of code forces students to articulate their understanding, similar to the "rubber duck debugging" method. AP CS Principles Create Performance Task: Frame prompt-based coding as a tool for the "Explore" phase. Students can use it to research algorithms or syntax for their chosen project, but must still write, understand, and be able to explain their own original code for the final submission. Emphasize that the performance task requires explaining their code and development process, which is impossible if they simply copy/paste.
Time: 55-60
Section: Wrap-Up
Activity: Q&A and Wrap-up
Answer any remaining questions and provide resources for further learning. Conclude by reiterating that AI is a powerful tool for augmenting, not replacing, foundational programming skills.
Required Materials
A computer with internet access for each participant.
Access to a prompt-based coding tool (e.g., Gemini, Copilot).
Pre-prepared code snippet with a bug for the debugging activity.
Presentation slides outlining the core concepts and activities.
After this session, participants will be able to:
Design/Implement a lesson activity that integrates a prompt-based coding tool to scaffold a complex programming concept, moving beyond simple syntax to higher-order thinking.
Formulate effective, inquiry-based prompts that model for students how to deconstruct problems, clarify syntax, and request explanations rather than just final solutions.
Apply pedagogical strategies, such as AI-assisted debugging and "duck walking," to transform common coding frustrations into powerful, reflective learning opportunities.
Facilitate a classroom discussion on the ethical and effective use of AI in programming, preparing students for modern collaborative workflows and responsible digital citizenship.
Integrate these strategies to create a more inclusive and differentiated learning environment that supports a wider range of student needs and abilities.
https://cdn.iste.org/www-root/Libraries/Documents%20%26%20Files/Artificial%20Intelligence/AIGDSE_1120.pdf
https://www.gse.harvard.edu/ideas/usable-knowledge/25/07/developing-ai-ethics-classroom
https://resilienteducator.com/classroom-resources/prompt-engineering-techniques-students/
https://juholeinonen.com/assets/pdf/denny2023promptly.pdf
Gemini: https://gemini.google.com/app
ChatGPT: https://chatgpt.com/
CoPilot: https://copilot.microsoft.com/
And a coding ide (examples below):
Online ide: https://www.online-ide.com/
Code.org Python lab (requires free account): https://studio.code.org/projects/pythonlab
JuiceMind: https://play.juicemind.com/sandbox