Creative Coding with Python and AI
A teacher-led lesson introducing students to Python through creative coding. Students design colorful pixel art and animations while learning loops and variables, guided by an AI Debugging Buddy that helps fix code and encourages responsible AI use. The activity builds creativity, problem-solving and confidence in computer science.
- Grades 3-8
- 1 hour
- Beginner
- Teacher-led
Three steps and you are ready to teach.
Sign up for imagi Edu
A creative CS and AI literacy platform combining standards-aligned lessons with interactive projects.
Sign up freeCreate your classroom
Create a classroom and add your students. Students join with classroom access codes, so no personal information is needed.
View setup guideGuide the activity
Use the ready-made teacher slides to guide the activity. Beginner-friendly for both teachers and students.
Open slidesStudents need two things.
Log in with your classroom code
Log in with the classroom access code and password your teacher shares.
Log inStart creating
Your imagination is your limit. Create fun animated designs in imagi Edu.
Open imagi EduEverything you need is already made.
Lesson plan
Step-by-step guide outlining objectives, activities and discussion prompts.
View lesson planTeaching slides
Ready-to-present slides introducing Python basics and the AI Debugging Buddy.
Open slidesSetup guide
Directions for getting started with imagi Edu and setting up your classroom.
View guideLearning Center
Extensive project ideas, fun challenges and Python documentation.
Visit Learning CenterBefore you start
Setup needed
- Devices with internet and a modern browser
- Access to imagi Edu for teacher and students
- Optional: projection or sample display, if doing a whole-class demo
Important notes
- No external or third-party accounts required. Everything runs in imagi Edu.
- Teachers create the classroom and add students, with anonymous usernames.
- You can view, copy or export student credentials as printable reminder cards.
- Designed for beginners; no prior coding experience needed.
- Reusable beyond Hour of AI: you can use it in later classes.
Standards alignment
CSTA Level 1B (Grades 3-5)
Computing Systems: 1B-CS-01, 1B-CS-02, 1B-CS-03
Data and Analysis: 1B-DA-06, 1B-DA-07
Algorithms and Programming: 1B-AP-08, 1B-AP-09, 1B-AP-10, 1B-AP-11, 1B-AP-12, 1B-AP-13, 1B-AP-14, 1B-AP-15, 1B-AP-16, 1B-AP-17
Impacts of Computing: 1B-IC-18, 1B-IC-19, 1B-IC-20
CSTA Level 2 (Grades 6-8)
Computing Systems: 2-CS-03
Data and Analysis: 2-DA-07
Algorithms and Programming: 2-AP-10, 2-AP-11, 2-AP-13, 2-AP-14, 2-AP-15, 2-AP-16, 2-AP-17, 2-AP-18, 2-AP-19
Impacts of Computing: 2-IC-20, 2-IC-21
ISTE
1.1 Empowered Learner: 1.1.a, 1.1.b, 1.1.c, 1.1.d
1.2 Digital Citizen: 1.2.b, 1.2.c
1.3 Knowledge Constructor: 1.3.a, 1.3.c, 1.3.d
1.4 Innovative Designer: 1.4.a, 1.4.b, 1.4.c, 1.4.d
1.5 Computational Thinker: 1.5.a, 1.5.b, 1.5.c, 1.5.d
1.6 Creative Communicator: 1.6.a, 1.6.b, 1.6.c, 1.6.d
1.7 Global Collaborator: 1.7.a, 1.7.b, 1.7.c, 1.7.d
Frequently asked questions
What is the Hour of AI?
The Hour of AI is an evolution of the Hour of Code, created in response to the growing call to expand foundational AI literacy alongside computer science. It consists of one-hour activities that are accessible to beginners and show that anyone can learn to code and create with AI. Learn more at hourofai.org.
Who can participate in the Hour of AI?
Anyone can participate, including students, teachers, parents and individuals of all ages. Activities are available for various age groups and skill levels.
Do I need prior coding or AI experience?
No. This activity is designed to be beginner-friendly for both teachers and students.
What devices do I need?
Each student needs a desktop, laptop, Chromebook or tablet with an internet connection and an up-to-date browser. No downloads are required. Students can work in pairs on the same device if there aren’t enough devices.
Can I use imagi Edu year-round?
Yes. This activity runs on the free tier of imagi Edu any time during the school year. You can also upgrade to access our full curriculum.
Is this available for non-traditional educators?
After-school programs, clubs, tutors, substitute teachers, community organizations and homeschooling parents can all use the Hour of AI activities through imagi Edu.
Try our other Hour of AI activities
Vibe Coding: Build Your First Game Using AI
Students use natural-language prompts and AI to build and customize their own game.
Learn moreVibe Coding: Build Your Dream School
Students imagine their dream school, then build an app with AI to pitch to their school leader.
Learn moreRun your Hour of AI with Python and pixel art.
Sign up, create a classroom, open the slides. Your students can be coding in the first ten minutes.