forked from lechuzalibre/python-scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrandomstory.py
More file actions
17 lines (14 loc) · 694 Bytes
/
Copy pathrandomstory.py
File metadata and controls
17 lines (14 loc) · 694 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
'''The task is to generate a random story every time user runs the program.'''
# Importing the required modules
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']
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']
# Defining the main function
def main():
'''This is the main function'''
print(random.choice(when), random.choice(who), random.choice(went), random.choice(happened))
# Calling the main function
if __name__ == '__main__':
main()