Skip to content

Story Generator#91

Open
AdyaTech wants to merge 1 commit into
Grow-with-Open-Source:mainfrom
AdyaTech:StoryGenerator
Open

Story Generator#91
AdyaTech wants to merge 1 commit into
Grow-with-Open-Source:mainfrom
AdyaTech:StoryGenerator

Conversation

@AdyaTech
Copy link
Copy Markdown

@AdyaTech AdyaTech commented May 7, 2026

📖 Story Generator (using Python)

📌 Introduction

The Story Generator is a fun Python project that creates random short stories by combining different words and phrases from predefined lists.

Each time the program runs, it generates a unique and sometimes hilarious story using random selections for characters, locations, events, and actions.


🚀 Features

  • Generates random stories instantly
  • Uses Python’s random module
  • Combines characters, places, and events dynamically
  • Produces a different story every run
  • Beginner-friendly and easy to customize

💻 Example

Yesterday, a turtle that lived in Germany, went to the school and solved a mystery

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 7, 2026

👋 @AdyaTech
Thank you for raising your pull request.
Please make sure you have followed our contributing guidelines. We will review it as soon as possible.

@iamwatchdogs iamwatchdogs changed the title Contributing my Python project by the name of Story Generator in this… Story Generator May 20, 2026
Copy link
Copy Markdown
Contributor

@iamwatchdogs iamwatchdogs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @AdyaTech, please make the following changes to proceed with your PR:

  • Update the Python script with relevant changes.
  • Rename your project directory based on the specified guidelines.

Please don't create a new commit to implement the requested changes. Instead, amend the existing commit and force push the changes to the PR branch.

Comment on lines +1 to +8
import random
when = ['A few years ago', 'Yesterday', 'Last night', 'A long time ago','On 20th Jan']
who = ['a rabbit', 'an elephant', 'a mouse', 'a turtle','a cat']
name = ['Ali', 'Miriam','daniel', 'Hoouk', 'Starwalker']
residence = ['Barcelona','India', 'Germany', 'Venice', 'England']
went = ['cinema', 'university','seminar', 'school', 'laundry']
happened = ['made a lot of friends','Eats a burger', 'found a secret key', 'solved a mistery', 'wrote a book']
print(random.choice(when) + ', ' + random.choice(who) + ' that lived in ' + random.choice(residence) + ', went to the ' + random.choice(went) + ' and ' + random.choice(happened)) No newline at end of file
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You must write code that is readable an understanable

Suggested change
import random
when = ['A few years ago', 'Yesterday', 'Last night', 'A long time ago','On 20th Jan']
who = ['a rabbit', 'an elephant', 'a mouse', 'a turtle','a cat']
name = ['Ali', 'Miriam','daniel', 'Hoouk', 'Starwalker']
residence = ['Barcelona','India', 'Germany', 'Venice', 'England']
went = ['cinema', 'university','seminar', 'school', 'laundry']
happened = ['made a lot of friends','Eats a burger', 'found a secret key', 'solved a mistery', 'wrote a book']
print(random.choice(when) + ', ' + random.choice(who) + ' that lived in ' + random.choice(residence) + ', went to the ' + random.choice(went) + ' and ' + random.choice(happened))
import random
when = [
"A few years ago",
"Yesterday",
"Last night",
"A long time ago",
"On 20th January"
]
who = [
"a rabbit",
"an elephant",
"a mouse",
"a turtle",
"a cat"
]
names = [
"Ali",
"Miriam",
"Daniel",
"Houuk",
"Starwalker"
]
places = [
"Barcelona",
"India",
"Germany",
"Venice",
"England"
]
went_to = [
"cinema",
"university",
"seminar",
"school",
"laundry"
]
happened = [
"made a lot of friends",
"ate a burger",
"found a secret key",
"solved a mystery",
"wrote a book"
]
story = (
f"{random.choice(when)}, "
f"{random.choice(names)} the {random.choice(who)} "
f"from {random.choice(places)} went to the "
f"{random.choice(went_to)} and "
f"{random.choice(happened)}."
)
print(story)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants