Skip to content

Commit 4b1630c

Browse files
committed
What's Your Story
1 parent 884c9cf commit 4b1630c

File tree

4 files changed

+22
-0
lines changed

4 files changed

+22
-0
lines changed
Loading
Loading
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import random
2+
# random module comes pre-installed with python
3+
4+
when = ['A few years ago', 'Yesterday', 'Last night', 'A long time ago','On 20th Jan']
5+
went = ['cinema', 'university','seminar', 'school', 'laundry', 'asylum', 'cave', 'mall', 'disneyland']
6+
happened = ['made a lot of friends','ate a pizza', 'found a secret key', 'solved a mystery', 'wrote a book','stole ice cream','ate a lot of cakes']
7+
who = ['Hulk', 'Iron Man', 'Batman', 'Superman', 'Captain America', 'Spiderman']
8+
desc = ['I met a good human being named ', 'I met my friend ', 'the person I met through social media, ']
9+
cartoon = ['Spongebob','Doraemon','Shinchan','Minions','Mickey']
10+
action = ['played hide and seek','clicked selie','had coffee']
11+
end = ['We rode our unicorns back home.', 'We flew back on home on our broomstick.', 'An eagle dropped us home.']
12+
# here we declare some lists which will help us to build our story
13+
14+
15+
name = [item for item in input("What is your good name ?? ").split()]
16+
friend = [item for item in input("What is your friend's name ?? ").split()]
17+
place = [item for item in input("Where are you from ?? ").split()]
18+
tour = [item for item in input("Any favourite destination ?? ").split()]
19+
# name, place, favorite destination is taken from the user
20+
21+
print("\n")
22+
print('Hello, I am '+random.choice(name)+'. '+random.choice(when) + ', ' + random.choice(desc) + random.choice(friend) + ' who lives in ' + random.choice(place) + '. We made plans to go to '+random.choice(tour)+' with '+random.choice(who)+'. Then we went to the ' + random.choice(went) + ' and ' + random.choice(happened)+'. We '+random.choice(action)+' with '+random.choice(cartoon)+'. '+random.choice(end))

0 commit comments

Comments
 (0)