A Flipped Classroom Approach for Fostering Debugging Skills and AI Literacy
| Course Subject: | Introduction to Programming with Python |
| Student Level: | Graduate |
| Number of Students: | 30 per section |
| Developed by: | John Wilder, Assistant Teaching Professor, College of Professional Studies |
What Students Will Do
In this activity, students work in small groups in class to troubleshoot a complex error in provided Python code. They will then use an AI tool to help them generate a solution, and evaluate that solution. By doing this hands-on work in the class, students will learn from the instructor and from each other.
Purpose
The goal of the lesson is to help students learn the thought processes behind debugging and evaluating computer code while simultaneously developing AI literacy skills. The reasoning behind the flipped classroom approach is that during a lecture, students tend to believe they understand the topic, but when they try to do the work at home, they encounter problems and realize they don’t understand as well as they previously believed. The flipped classroom model changes this by having the students work on problems during class so the teacher is present when they find that they are struggling.
Assessment
The assessment will be done informally, as students share their process and results with the whole class and the instructor. The instructor will be listening for students’ reasoning about why solutions work or don’t work, rather than focusing solely on correct answers.
Faculty Reflections
As AI tools advance in their ability to generate computer code, learning to read and evaluate that code is emerging as an important skill. Learning to code should not just be about code generation, but also about understanding existing code.
When conducting the activity described here, it’s important that the coding error provided to students is complex enough that the AI tool is not able to easily solve it.
Gemini is an AI tool that does a good job with this activity. Its output models many of the steps I teach students to go through when encountering an error in their code. Google Colab with Gemini is a good option, and can allow for working on a shared document, but for a large class, Colab would be problematic because the students’ account restrictions do not allow them to share the document for collaboration.
Claude is recommended as an alternative. It requires that students ask the AI for help outside of their coding environment which decreases the ease of having the AI do their work for them. The output of Claude more closely models the debugging steps I teach students to go through than does Gemini. Claude often outputs multiple solutions, describing situations in which each one might be the best solution.
Step-by-Step Directions
| Step 1 | Work in assigned small groups to troubleshoot a complex coding bug that is not easily solved by AI. NOTE: Having all groups work with the same code has the advantage of cross-group comparisons of results. Offering a choice from several options could potentially increase students’ sense of autonomy and motivation. |
| Step 2 | Students run the code to generate the error message. |
| Step 3 | Discuss the error and identify the cause. |
| Step 4 | Upload the code into Claude and prompt the tool to assist in troubleshooting the error. |
| Step 5 | Reflect on Claude’s response and iteratively revise until you are satisfied with the results. Consider:
|
| Step 6 | One person from each group shares their prompts, results, thought processes, and rationale for why they were satisfied with the results. |
| Step 7 | Submit your chat transcript. |
Download PDF version of this assignment
Return to AI Gallery Home