Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- # -*- coding: utf-8 -*-
- # Filename: ipp1_3_first_middle_last.py
- # Version: 1.0.0
- # Author: Jeoi Reqi
- """
- Description:
- - This script demonstrates the additional practice project to include a silly middle name using "Chapter 1: Project #1 - Silly Name Generator" from the book "Impractical Python Projects" by Lee Vaughan.
- - The script generates humorous pseudonyms by combining random first names, middle names, and last names.
- - It utilizes the random module to select names from predefined lists.
- Requirements:
- - Python 3.x
- - The following modules:
- - sys
- - random
- Functions:
- - generate_funny_name():
- Generates a humorous pseudonym by combining a random first name, middle name, and last name.
- Usage:
- - Ensure you have Python 3.x installed on your system.
- - Save the script to a file, for example, `funny_name_generator.py`.
- Running the Script:
- - Open a terminal or command prompt.
- - Navigate to the directory where the script is saved.
- - Run the script using the command: python funny_name_generator.py.
- Output:
- - Upon running the script, a humorous pseudonym will be generated and printed to the console.
- """
- import random
- import sys
- # Lists of first, middle, and last names
- first_names = ['Baby Oil', 'Bad News', 'Big Burps', "Bill 'Beenie-Weenie'", "Bob 'Stinkbug'", 'Bowel Noises', 'Boxelder', "Bud 'Lite'", 'Butterbean', 'Buttermilk', 'Buttocks', 'Chad', 'Chesterfield', 'Chewy', 'Chigger', "Cinnabuns", 'Cleet', 'Cornbread', 'Crab Meat', 'Crapps', 'Dark Skies', 'Dennis Clawhammer', 'Dicman', 'Elphonso', 'Fancypants', 'Figgs', 'Foncy', 'Gootsy', 'Greasy Jim', 'Huckleberry', 'Huggy', 'Ignatious', 'Jimbo', "Joe 'Pottin Soil'", 'Johnny', 'Lemongrass', 'Lil Debil', 'Longbranch', '"Lunch Money"', 'Mergatroid', '"Mr Peabody"', 'Oil-Can', 'Oinks', 'Old Scratch', 'Ovaltine', 'Pennywhistle', 'Pitchfork Ben', 'Potato Bug', 'Pushmeet', 'Rock Candy', 'Schlomo', 'Scratchensniff', 'Scut', "Sid 'The Squirts'", 'Skidmark', 'Slaps', 'Snakes', 'Snoobs', 'Snorki', 'Soupcan Sam', 'Spitzitout', 'Squids', 'Stinky', 'Storyboard', 'Sweet Tea', 'TeeTee', 'Wheezy Joe', "Winston 'Jazz Hands'", 'Worms']
- middle_names = ['Alfred', 'Bartholomew', 'Biscuit', 'Boo Boo', 'Bubbles', 'Candyfloss', 'Cheesecake', 'Cupcake', 'Cuthbert', 'Digory', 'Dingleberry', 'Dorkface', 'Dumpling', 'Ephraim', 'Ferdinand', 'Fiddlesticks', 'Fluffernutter', 'Fuzzy', 'Gideon', 'Giggle', 'Goofball', 'Gumdrop', 'Honeybee', 'Humphrey', 'Ignatius', 'Jedediah', 'Jellybean', 'Jiggle', 'Klaus', 'Kookaburra', 'Lazarus', 'Lemon', 'Lollipop', 'Marshmallow', 'Merryweather', 'Montague', 'Muffin', 'Nettle', 'Noodle', 'Nugget', 'Obadiah', 'Peaches', 'Percival', 'Pickle', 'Pudding', 'Quentin', 'Reginald', 'Rosenblaut', 'Sillypants', 'Simeon', 'Snoozer', 'Sprinkles', 'Squiggle', 'Thaddeus', 'Tiddlywinks', 'Tootsie', 'Twinkle', 'Uriah', 'Valentin', 'Waffle', 'Waldo', 'Whippersnapper', 'Xerxes', 'Yancy', 'Zebulon', 'Zigzag']
- last_names = ['Appleyard', 'Bigmeat', 'Bloominshine', 'Boogerbottom', 'Breedslovetrout', 'Butterbaugh', 'Clovenhoof', 'Clutterbuck', 'Cocktoasten', 'Endicott', 'Fewhairs', 'Gooberdapple', 'Goodensmith', 'Goodpasture', 'Guster', 'Henderson', 'Hooperbag', 'Hoosenater', 'Hootkins', 'Jefferson', 'Jenkins', 'Jingley-Schmidt', 'Johnson', 'Kingfish', 'Listenbee', "M'Bembo", 'McFadden', 'Moonshine', 'Nettles', 'Noseworthy', 'Olivetti', 'Outerbridge', 'Overpeck', 'Overturf', 'Oxhandler', 'Pealike', 'Pennywhistle', 'Peterson', 'Pieplow', 'Pinkerton', 'Porkins', 'Putney', 'Quakenbush', 'Rainwater', 'Rosenthal', 'Rubbins', 'Sackrider', 'Snuggleshine', 'Splern', 'Stevens', 'Stroganoff', 'Sugar-Gold', 'Swackhamer', 'Tippins', 'Turnipseed', 'Vinaigrette', 'Walkingstick', 'Wallbanger', 'Weewax', 'Weiners', 'Whipkey', 'Wigglesworth', 'Wimplesnatch', 'Winterkorn', 'Woolysocks']
- def generate_funny_name():
- """
- Generates a humorous pseudonym by combining a random first name, middle name, and last name.
- Returns:
- str: A randomly generated pseudonym.
- """
- first_name = random.choice(first_names)
- middle_name = random.choice(middle_names)
- last_name = random.choice(last_names)
- return f"\n{first_name} {middle_name} {last_name}"
- if __name__ == "__main__":
- print("Welcome to the Funny Name Generator!\n")
- print("Generating a humorous pseudonym...\n")
- while True:
- funny_name = generate_funny_name()
- print(funny_name, file=sys.stderr)
- print("\n")
- try_again = input("Press [Enter] to try again. (or.. type '0' to Exit):")
- if try_again.lower() == "0":
- print("\nExiting Program... GoodBye!\n")
- break
Add Comment
Please, Sign In to add comment