Thursday, March 14, 2024

Random poem generator!



This Python script generates 100 poems with random variations (from chatGPT)
---------------------------------------------------------------------------------------------------
import random # Lists of words and phrases for generating poems themes = ["nature", "beauty", "love", "freedom", "hope"] moods = ["serenity", "joy", "melancholy", "inspiration", "wonder"] verbs = ["awakens", "dances", "whispers", "shines", "blooms"] nouns = ["lake", "tree", "sky", "breeze", "flower"] # Function to generate a random poem def generate_poem(): theme = random.choice(themes) mood = random.choice(moods) verb = random.choice(verbs) noun = random.choice(nouns) poem = f"In the {mood} of the {theme},\n{theme.capitalize()} {verb} with a {noun}.\n" for _ in range(4): adjective = random.choice(["tranquil", "golden", "whispering", "gentle", "rippling"]) noun = random.choice(nouns) poem += f"{adjective.capitalize()} {noun}s {verb} nearby.\n" return poem # Generate 100 poems for i in range(1, 101): poem = generate_poem() print(f"Poem {i}:\n{poem}\n")
----------------------------------------------------------------------------------------------------------

Just random quotes created by chatGPT


1. "Stars can't shine without darkness."
2. "The greatest risk in life is not taking one."
3. "Sometimes the wrong choices bring us to the right places."
4. "Life is not about waiting for the storm to pass but learning to dance in the rain."
5. "Your vibe attracts your tribe."
6. "The only impossible journey is the one you never begin."
7. "It's not the years in your life that count. It's the life in your years."
8. "The most wasted of all days is one without laughter."
9. "The only person you are destined to become is the person you decide to be."
10. "Your wings already exist. All you have to do is fly."