Coders Packet

Mad Libs Generator in Python

By Akshitha Theretupally

Mad libs generator in Python is a fun game that creates a story using the words given as input. User has to enter substitutes for blanks in the story without knowing the story.

This project aims to develop a Mad Libs Generator project using Python. First, the user must select the title of the story from the window. Secondly, the user has to enter specific words like a noun, location, verb, etc as per requirements. And then the story will be generated.

This project is developed for having a basic idea of the Tkinter module.

Module required: Tkinter

Tkinter is a GUI Python library used to build GUI applications in the fastest and easiest way. 

Python combined with  Tkinter provides a fast and easy way to create GUI applications.

Tkinter is included in all standard python distributions. 

Methodology:

Step 1: The first step is to import the Tkinter module

Step 2: Then, Create a display window using this Tkinter module(In this project, a window is used to display contents and buttons)

Step 3:Define some functions which ask the user for some inputs and print a story. (I defined two functions as an example)

Step 4:Create buttons for each function. So, based on user interest he/she selects the story.

We can create as many functions with funny stories as possible and enjoy this game.

Download Complete Code

Comments

No comments yet