My First Modern Haiku Generator in Python

I enjoy reading about haiku in Python programming. I searched some examples through my Bing Search before I remixed the program from the web 101Computing.

Thanks to the Trinket.io that allows learners to use a free plan to run the Python scripts and share the creation to the world.

My haiku inspiration came from the 18th century Japanese famous poet, Kobayashi Issa. He wrote:

“O Snail …. Climb Mount Fuji ….. but slowly, slowly!”

-Kobayashi Issa

I picked this line because I was that snail once. 🤣 The Python scripts itself are using the randint() function, list, and index.

From running the scripts above, I found some interesting outputs below. Please experiment yourself by changing the words and the composition between nouns, verbs, adjective, and transition words. I bet you will find it amusing. Happy coding!!!

Output1

Elon Musk achieves,
achieves believable a full moon,
hence to accelerate the victory.

Output2

Rihanna braves,
braves awesome the world,
on the next day.... making it to glory.

Output3

Bill Gates magnifies,
magnifies amicably the green lands,
furthermore, to believe a bright future.

Scroll to Top