pyBegin / projects / python-story-generator
🪟

Python Story Generator

A Tkinter desktop application that generates a random short story (at least 100 words) by combining randomly chosen phrases. Click the "Generate St…

95 lines🖥 Desktop only

Python Story Generator

A Tkinter desktop application that generates a random short story (at least 100 words) by combining randomly chosen phrases. Click the "Generate Story" button to produce a new story.

Example

  1. The window titled "Python Story Generator" opens with a "Generate Story" button and a scrollable text area.
  2. Click "Generate Story". The text area fills with a multi-sentence story built from random phrase combinations, for example: "A few years ago, a rabbit named Ali, who lived in Barcelona, decided to go to the cinema. Ali made a lot of friends while at the cinema."
  3. Click "Generate Story" again to replace the text with a completely new story of at least 100 words.

How to run on localhost

pip install ttkthemes
python story.py

Dependencies