This is my code
print('Hello There, Welcome to EmoBot,Your personal diary assistant')
from six.moves import input as raw_input
ans=True
while ans:
print("""
1.I am happy
2.I feel sad
3.I feel angry
""")
ans=raw_input("How can I help you?(Choose 1,2 or3)")
if ans=="1":
print("\n Oh! That is Wonderful")
a=True
while a:
print("""
p.It is work-related
q.It is home-related
r.It is school-related
s.It is my personal-life related
""")
a=raw_input('What is the reason for your happiness?(Choose p,q,r or s)')
a=None
if a=="p":
print('\n Oh Cool! Always remember to stay focused in work. Good Luck')
elif a=="q":
print('\n Nice! Family is the one stop for all the emotions in life')
elif a=="r":
print('\n Great! School is the place full of experiences, once you live it you cant relive it. So enjoy your days at school')
else:
print('\n Epic! The happiness that you get when you achieve something that you wanted to achieve for long is the greatest')
ans=None
This is the Output
Hello There, Welcome to EmoBot,Your personal diary assistant
1.I am happy
2.I feel sad
3.I feel angry
How can I help you?(Choose 1,2 or3)1
Oh! That is Wonderful
p.It is work-related
q.It is home-related
r.It is school-related
s.It is my personal-life related
What is the reason for your happiness?(Choose p,q,r or s)p
Epic! The happiness that you get when you achieve something that you wanted to achieve for long is the greatest
Here, it was supposed to show the result in "p" variable but instead, it showed the one in "s".