Skip to content

sadman2084/Madlibs_Generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Madlibs_Generator

Overview

This Python script is designed to replace bracketed words in a text file with user-defined replacements. Bracketed words are identified within angle brackets ("<" and ">") in the input text file, and the script prompts the user to provide replacements for each bracketed word. Once all replacements are provided, the script replaces the bracketed words in the text file with the user-provided replacements and prints out the modified text.

How to Use

  1. Input File: Ensure that you have a text file named story.txt containing the text with bracketed words you want to replace. Place this file in the same directory as the Python script.

  2. Run the Script: Execute the Python script Madlibs_generator.py. This script will read the contents of story.txt, identify bracketed words, prompt you to provide replacements for each bracketed word, perform the replacements, and then print the modified text.

  3. Provide Replacements: For each bracketed word identified in the text, the script will prompt you to enter a replacement. Enter the desired replacement for each bracketed word when prompted.

  4. View Output: Once replacements are provided for all bracketed words, the script will print out the modified text with the replacements applied.

Notes

  • Ensure that Python is installed on your system.
  • This script assumes that bracketed words in the input text file are enclosed within angle brackets ("<" and ">").
  • The script will not modify the original story.txt file; it only prints the modified text to the console. If you want to save the modified text, you need to redirect the script's output to a file as described above.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages