-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathStory-Generator.py
21 lines (17 loc) · 935 Bytes
/
Story-Generator.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# Importing random module
import random
# Defining list of phrases which will help to build a story
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.']
# Selecting an item from each list and concatenating them.
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))