Created
January 2, 2022 22:49
-
-
Save CodeMaster7000/7e7db854672db1bbd9fa22eb5fec2147 to your computer and use it in GitHub Desktop.
A random yet interesting story generator coded in Python 3.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import random | |
| Sentence_starter = ['About 100 years ago', ' In the 20 BC', 'Once upon a time'] | |
| character = [' there lived a king.',' there was a man named Jack.', | |
| ' there lived a farmer.'] | |
| time = [' One day', ' One full-moon night'] | |
| story_plot = [' he was passing by',' he was going for a picnic to'] | |
| place = [' the mountains', ' the garden'] | |
| second_character = [' he saw a man', ' he saw a young lady'] | |
| age = [' who seemed to be in late 20s', ' who seemed very old and feeble'] | |
| work = [' searching something.', ' digging a well on roadside.'] | |
| print(random.choice(Sentence_starter)+random.choice(character)+ | |
| random.choice(time)+random.choice(story_plot) + | |
| random.choice(place)+random.choice(second_character)+ | |
| random.choice(age)+random.choice(work)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment