Coding with Poetry

A cute pink octopus character wearing a purple beanie hat performing a poem under a spotlight on a stage with a stool and microphone

Poem Art

Add art and animation to a classic poem in this Hour of Code activity!

Coding with Poetry

Connect computer science and poetry in your classroom with this series of lessons.

Learn more about Coding with Poetry

In the Coding with Poetry module in CS Connections, students will be able to see two subjects - computer science and poetry - in a new way. Over the course of five lessons, 4-8th-grade students build a poem-generating program to recite different versions of a poem they wrote. Then, students test their programs with their classmates and complete the project by sharing their user-generated poems in a poetry circle.

By building a poem generator, students learn about how computers take in user input, store it in memory, and output a desired product. By writing their own poems, students explore elements of poetry like grammar, mood, and word choice.

Our Poem Art Hour of Code activity is also the first lesson in the Coding with Poetry module of our Computer Science Connections curriculum. Register here for a special session of CodeBytes on Tuesday, December 7, at 10 a.m. ET and again at 10 a.m. PT; we'll show students how to get started with the Poem Art Hour of Code activity.

Teacher Info

How to continue learning after Coding with Poetry

In our new CS Connections curriculum, explore additional activities that combine ELA and computer science, and check out even more connections between computer science and other subjects like math, science, and social studies that you can bring into your classroom.

Featured Student Creations