Untitled
unknown
plain_text
a year ago
4.0 kB
21
Indexable
#It can recognize a limited range of emotions or conditions and respond to them finitely. Iām a beginner in Python, and I guess I could write it shorter and better.I wrote it with my knowledge.
#---------------------Start--------------------#
print ("Describe your emotions by emojis :\n")
sent = input()
length = len(sent)
print (sent+"\n")
#----------------Defining emojis---------------#
happy=["š","š","š","š","š","š","š¤£"]
sad=["š","š©","š„²","š","š¢","š","š£"]
angry=["š”","š¤","š ","š¤¬","š","šæ"]
relax=["š","š","š"]
tired=["šŖ","š„±","š“","šµ"]
scared=["š±","šØ","š°","š«£"]
horny=["š¤¤","š","š","š","š«¦","š
","š¦","š","š"]
poker=["š«¤","š¶","š","š"]
sick=["š¤®","š¤¢","š¤§","š·","š¤"]
kiss=["š","š","š","š"]
status=[False,False,False,False,False,False,False,False,False,False,False]
#----------------Checking emojis---------------#
for i in range(length):
if sent[i] in happy: status[0] = True
elif sent[i] in sad: status[1] = True
elif sent[i] in angry: status[2] = True
elif sent[i] in relax: status[3] = True
elif sent[i] in tired: status[4] = True
elif sent[i] in scared: status[5] = True
elif sent[i] in horny: status[6] = True
elif sent[i] in poker: status[7] = True
elif sent[i] in sick: status[8] = True
elif sent[i] in kiss: status[9] = True
#--------Responding to combined emojis--------#
if status[1] and status[2] and all(f == False for f in status[3:]) and status[0] == False :
print ("It seems you are angry and sad.š¢")
elif status[0] and status[3] and all(f == False for f in status[1:3]) and all(f == False for f in status[4:]):
print ("It seems you are happy and relax.āŗļø")
elif status[9] and (status[0] or status[3]) and all(f == False for f in status[1:3]) and all(f == False for f in status[4:9]):
print ("I'm embarrassed!š
š")
elif status[6] and (status[0] or status[9]) and all(f == False for f in status[1:6]) and all(f == False for f in status[7:9]):
print ("Are you horny right now?šš")
elif status[1] and (status[4] or status[8]) and all(f == False for f in status[5:8]) and all(f == False for f in status[9:]) and all(f == False for f in status[2:4]) and status[0] == False :
print ("Rest to get well and refresh.š")
#---------Responding to single emojis---------#
elif status[0] and all(f == False for f in status[1:]):
print ("I'm happy that you are happy and laughing!š")
elif status[1] and all(f == False for f in status[2:]) and status[0] == False :
print ("I'm sorry about your sadness.š")
elif status[2] and all(f == False for f in status[:2]) and all(f == False for f in status[3:]):
print ("Calm down babe!šØ")
elif status[3] and all(f == False for f in status[:3]) and all(f == False for f in status[4:]):
print ("It seems you are relax.āŗļø")
elif status[4] and all(f == False for f in status[:4]) and all(f == False for f in status[5:]):
print ("Are you tired? Rest well.š„°")
elif status[5] and all(f == False for f in status[:5]) and all(f == False for f in status[6:]):
print ("Take a deep breath and stay in safe place.š")
elif status[6] and all(f == False for f in status[:6]) and all(f == False for f in status[7:]):
print ("Are you horny?šš")
elif status[7] and all(f == False for f in status[:7]) and all(f == False for f in status[8:]):
print ("Nothing special,huh?")
elif status[8] and all(f == False for f in status[:8]) and all(f == False for f in status[9:]):
print ("Take your medicines and rest.š«")
elif status[9] and all(f == False for f in status[:9]):
print ("OMG...šš
šš")
elif all(f == False for f in status[:]):
print ("I didn't find any emoji / Undifined š")
#------Responding to conflicting emojis------#
else :
print ("I'm confused!šµāš« \nI have no idea!")
#------------------The End------------------#
Editor is loading...
Leave a Comment