Python Codes

Random Poem Generator


Indian Bloggers

This is a python code for a random poem generator. The code has a lot of scope for improvements. This project was implemented to learn python and python gui using tkinter.

It takes a keyword as a input and generates a random 4 line poem as output.

It uses python 3.4, tkinter and BeautifulSoup API’s.

The source code can be found here: Random Poem Generator

Advertisements

6 thoughts on “Random Poem Generator

    1. Here are two poem samples got for the keyword – ‘friend’ in two successive runs:

      Run 01:
      ———-
      friend synonyms, friend antonyms
      informal words should be
      the people gathered about
      boss, that friend of

      Run 02:
      ———-
      i vowed the captain
      friend synonyms,
      “all this is madness,”
      word origin & history

      Liked by 1 person

  1. Well it won’t be winning the Pulitzer but that’s not a bad thing 😉
    Presumably when it writes “friend synonyms” (or friend autonyms) it’s attempting to insert a synonym but hasn’t quite got that far..?
    It’s fun to see what it can come up with and I imagine they could actually make a good starting point to spark some ideas.

    Liked by 2 people

    1. LOL. Like said, it has a lot of scope for improvements. It was implemented to learn python.

      Not exactly. That is the line which is picked up after scraping the data. Though it picks randomly, that line is been common in both.

      Exactly, sometimes they turn out to be too good. 😀 Thank you so much for sharing your thoughts.. 🙂

      Liked by 1 person

Let me Know What you Think!

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s